findutils-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Findutils-patches] [PATCH] 2007-06-26 James Youngman <address@hidden>


From: James Youngman
Subject: [Findutils-patches] [PATCH] 2007-06-26 James Youngman <address@hidden>
Date: Tue, 26 Jun 2007 21:20:00 +0100

---
 ChangeLog     |   10 ++++++++++
 find/pred.c   |    3 ++-
 xargs/xargs.c |    3 ++-
 3 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index a702526..feff429 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -27,6 +27,16 @@
        * doc/Makefile.am (info_TEXINFOS): Added doc/find-main.texi.
        * doc/find.texi (Introduction): Fixed typo.
 
+       * find/pred.c (format_date): Use verify_true for constant
+       conditions rather than assert.
+       * xargs/xargs.c (main): Ditto.
+
+       Compare function pointers with memcmp(); fixes Savannah bug #20263.
+       * find/tree.c (cost_table_comparison): Use memcmp() to compare
+       function pointers, since ISO C does not specify that it will be
+       possible to do magnitude comparisons on them, and casting them to
+       void* is non-portable.
+
 2007-06-26  Eric Blake  <address@hidden>
 
        * import-gnulib.config (modules): Allow ./configure
diff --git a/find/pred.c b/find/pred.c
index d043d11..fc29f2d 100644
--- a/find/pred.c
+++ b/find/pred.c
@@ -47,6 +47,7 @@
 #include "stat-time.h"
 #include "dircallback.h"
 #include "error.h"
+#include "verify.h"
 
 #if ENABLE_NLS
 # include <libintl.h>
@@ -2025,7 +2026,7 @@ format_date (struct timespec ts, int kind)
    * demonstrating that the performance difference is actually
    * measurable.
    */
-  assert (sizeof(buf) >= LONGEST_HUMAN_READABLE);
+  verify_true (sizeof(buf) >= LONGEST_HUMAN_READABLE);
 
   charsprinted = 0;
   need_ns_suffix = 0;
diff --git a/xargs/xargs.c b/xargs/xargs.c
index b6d9186..d7dfe81 100644
--- a/xargs/xargs.c
+++ b/xargs/xargs.c
@@ -96,6 +96,7 @@
 #define SIGCHLD SIGCLD
 #endif
 
+#include "verify.h"
 #include "wait.h"
 #include "quotearg.h"
 
@@ -680,7 +681,7 @@ main (int argc, char **argv)
   /* Without SIZE_MAX (i.e. limits.h) this is probably 
    * close to the best we can do.
    */
-  assert (sizeof(size_t) <= sizeof(unsigned long));
+  verify_true (sizeof(size_t) <= sizeof(unsigned long));
 #endif
   
   if (show_limits)
-- 
1.5.2.1





reply via email to

[Prev in Thread] Current Thread [Next in Thread]