You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by wr...@apache.org on 2002/02/12 02:52:35 UTC
cvs commit: apr/strings apr_strnatcmp.c
wrowe 02/02/11 17:52:35
Modified: strings apr_strnatcmp.c
Log:
WinCE port from Mladen Turk <mt...@mappingsoft.com>
I think this question deserves an answer - is this assert legit????????
Revision Changes Path
1.8 +6 -3 apr/strings/apr_strnatcmp.c
Index: apr_strnatcmp.c
===================================================================
RCS file: /home/cvs/apr/strings/apr_strnatcmp.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- apr_strnatcmp.c 13 Dec 2001 17:26:15 -0000 1.7
+++ apr_strnatcmp.c 12 Feb 2002 01:52:35 -0000 1.8
@@ -22,10 +22,12 @@
#include <ctype.h>
#include <string.h>
-#include <assert.h>
-
#include "apr_strings.h"
#include "apr_lib.h" /* for apr_is*() */
+#if APR_HAVE_ERRNO_H
+/* Do we realy need the assert here ? */
+#include <assert.h>
+#endif
#if defined(__GNUC__)
# define UNUSED __attribute__((__unused__))
@@ -92,8 +94,9 @@
int ai, bi;
char ca, cb;
int fractional, result;
-
+#if APR_HAVE_ERRNO_H
assert(a && b);
+#endif
ai = bi = 0;
while (1) {
ca = a[ai]; cb = b[bi];
Re: cvs commit: apr/strings apr_strnatcmp.c
Posted by Justin Erenkrantz <je...@ebuilt.com>.
On Tue, Feb 12, 2002 at 01:52:35AM -0000, wrowe@apache.org wrote:
> wrowe 02/02/11 17:52:35
>
> Modified: strings apr_strnatcmp.c
> Log:
> WinCE port from Mladen Turk <mt...@mappingsoft.com>
>
> I think this question deserves an answer - is this assert legit????????
No. It violates our principle that we don't check the validity
of the input parameters.
I'm taking it out now. -- justin