OSSP CVS Repository

ossp - Check-in [998]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 998
Date: 2001-Sep-13 21:18:34 (local)
2001-Sep-13 19:18:34 (UTC)
User:rse
Branch:
Comment: use assert(3) instead of home-brewn stuff
Tickets:
Inspections:
Files:
ossp-pkg/l2/l2.h.in      1.7 -> 1.8     0 inserted, 13 deleted
ossp-pkg/l2/l2_ch_socket.c      1.27 -> 1.28     1 inserted, 1 deleted
ossp-pkg/l2/l2_p.h      1.16 -> 1.17     5 inserted, 0 deleted
ossp-pkg/l2/l2_sockmon.c      1.7 -> 1.8     2 inserted, 1 deleted

ossp-pkg/l2/l2.h.in 1.7 -> 1.8

--- l2.h.in      2001/09/13 16:32:12     1.7
+++ l2.h.in      2001/09/13 19:18:34     1.8
@@ -64,19 +64,6 @@
 #define TRUE (!FALSE)
 #endif
 
-#ifndef DEBUG
-#define ASSERT(expr) ((voir)0)
-#else
-#define ASSERT(expr)\
-        do {\
-            if (!(expr)) {\
-                fprintf(stderr, "Assertion failed in %s line %d! ", __FILE__, __LINE__);\
-                exit(1);\
-            }\
-        }\
-        while (0)
-#endif
-
 /* forward declarations for opaque data structures */
 union  l2_context_un;
 struct l2_param_st;


ossp-pkg/l2/l2_ch_socket.c 1.27 -> 1.28

--- l2_ch_socket.c       2001/09/13 16:19:06     1.27
+++ l2_ch_socket.c       2001/09/13 19:18:34     1.28
@@ -53,7 +53,7 @@
     const char      *pszIndex     = NULL;    /* To index IPv6 validity */
     char            *pszNextfield = "";      /* For IPv6 address trans */
 
-    ASSERT(pvMemref);
+    assert(pvMemref != NULL);
     if (iFamily == AF_INET) {
         if (inet_aton(pszAddress, &IP4Addr)) {
             memcpy(pvMemref, &IP4Addr, sizeof(struct in_addr));


ossp-pkg/l2/l2_p.h 1.16 -> 1.17

--- l2_p.h       2001/09/12 13:50:46     1.16
+++ l2_p.h       2001/09/13 19:18:34     1.17
@@ -33,6 +33,11 @@
 #include <stdlib.h>
 #include <errno.h>
 
+#ifndef DEBUG
+#define NDEBUG
+#endif
+#include <assert.h>
+
 #include "l2.h"
 #include "l2_config.h"
 #include "l2_ut_pcre.h"


ossp-pkg/l2/l2_sockmon.c 1.7 -> 1.8

--- l2_sockmon.c 2001/09/13 16:19:06     1.7
+++ l2_sockmon.c 2001/09/13 19:18:34     1.8
@@ -32,6 +32,7 @@
 #include <netinet/in.h>
 #include <stdio.h>
 #include <errno.h>
+#include <assert.h>
 
 #include "l2.h"
 
@@ -43,7 +44,7 @@
     int  i        = 0;
     char *pszTemp = NULL;
 
-    ASSERT(pszIn);
+    assert(pszIn != NULL);
 
     if ((pszTemp = (char *)strdup(pszIn)) == NULL)
         return NULL;

CVSTrac 2.0.1