OSSP CVS Repository

ossp - Difference in ossp-pkg/lmtp2nntp/lmtp.c versions 1.15 and 1.16
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/lmtp2nntp/lmtp.c 1.15 -> 1.16

--- lmtp.c       2001/08/23 09:12:30     1.15
+++ lmtp.c       2001/08/27 14:49:32     1.16
@@ -43,6 +43,10 @@
 #include "dmalloc.h"
 #endif
 
+#ifndef NUL
+#define NUL '\0'
+#endif
+
 /* maximum LMTP protocol line length */
 #define LMTP_LINE_MAXLEN 1024
 
@@ -120,7 +124,7 @@
 
     lmtp->rl.rl_cnt = 0;
     lmtp->rl.rl_bufptr = NULL;
-    lmtp->rl.rl_buf[0] = '\0';
+    lmtp->rl.rl_buf[0] = NUL;
     lmtp->rfd = rfd;
     lmtp->wfd = wfd;
     
@@ -179,7 +183,7 @@
         buf[n++] = c;       /* output char into given buffer */
 
     }
-    buf[n] = '\0';          /* string termination */
+    buf[n] = NUL;          /* string termination */
     if (n == (buflen-1)) 
         return LMTP_ERR_OVERFLOW;
     return LMTP_OK;
@@ -237,14 +241,14 @@
         }
         else if (rc == LMTP_OK) {
             if (strcmp(cpLine, ".") == 0) {     /* dot alone is end of message */
-                *cpLine = '\0';                 /* hide dot from caller */
+                *cpLine = NUL;                 /* hide dot from caller */
                 break;
             }
             if (*cpLine == '.')                 /* escaped dot */
                 memmove(cpLine, cpLine+1, strlen(cpLine+1)+1);
             cpPtr += strlen(cpPtr);             /* write cursor to the end */
             *cpPtr++ = '\n';                    /* artifical NL */
-            *cpPtr = '\0';                      /* artifical end of string */
+            *cpPtr = NUL;                      /* artifical end of string */
             cpLine = cpPtr;                     /* start of line */
         }
         else break;                             /* rc == LMTP_ERR* */
@@ -286,7 +290,7 @@
                 continue; /* skip  ""  verb */
             if (   (strlen(req->msg) >= verblen)
                 && (strncasecmp(req->msg, verb, verblen) == 0)
-                && (   (req->msg[verblen] == '\0')
+                && (   (req->msg[verblen] == NUL)
                     || (req->msg[verblen] == ' ') )           ) {
                 req->verb = verb;
                 return LMTP_OK;

CVSTrac 2.0.1