OSSP CVS Repository

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

ossp-pkg/lmtp2nntp/nntp.c 1.17 -> 1.18

--- nntp.c       2001/08/27 14:29:11     1.17
+++ nntp.c       2001/08/27 14:49:32     1.18
@@ -53,6 +53,10 @@
 #define TRUE (!FALSE)
 #endif
 
+#ifndef NUL
+#define NUL '\0'
+#endif
+
 /* maximum NNTP protocol line length */
 #define NNTP_LINE_MAXLEN 1024
 
@@ -92,7 +96,7 @@
     nntp->wfd = wfd;
     nntp->rl.rl_cnt = 0;
     nntp->rl.rl_bufptr = NULL;
-    nntp->rl.rl_buf[0] = '\0';
+    nntp->rl.rl_buf[0] = NUL;
     nntp_timeout(nntp, 3);
     nntp->kludgeinn441dup = FALSE;
 
@@ -204,7 +208,7 @@
         buf[n++] = c;       /* output char into given buffer */
 
     }
-    buf[n] = '\0';          /* string termination */
+    buf[n] = NUL;          /* string termination */
     if (n == (buflen-1)) 
         return NNTP_ERR_OVERFLOW;
     return NNTP_OK;
@@ -254,7 +258,7 @@
      *  
      *  In other words, INN *requires* the use of "MODE READER".
      */
-    *line = '\0';
+    *line = NUL;
     strcat(line, "MODE READER");
     if ((rc = nntp_writeline(nntp, line)) != NNTP_OK)
         return rc;
@@ -278,7 +282,7 @@
      *  < 223 yes, article already known
      *  < 430 no, i don't know the article, yet
      */
-    *line = '\0';
+    *line = NUL;
     strcat(line, "STAT ");
     strcat(line, msg->cpMsgid);
     if ((rc = nntp_writeline(nntp, line)) != NNTP_OK)
@@ -318,7 +322,7 @@
      *  
      *  In other words, INN uses 441 for other status messages as well.
      */
-    *line = '\0';
+    *line = NUL;
     strcat(line, "POST");
     if ((rc = nntp_writeline(nntp, line)) != NNTP_OK)
         return rc;
@@ -381,7 +385,7 @@
      *  < 437 Unwanted newsgroup "quux"
      *  < 480 Transfer permission denied
      */
-    *line = '\0';
+    *line = NUL;
     strcat(line, "IHAVE ");
     strcat(line, msg->cpMsgid);
     if ((rc = nntp_writeline(nntp, line)) != NNTP_OK)

CVSTrac 2.0.1