]> diplodocus.org Git - nmh/blobdiff - uip/popsbr.c
uip/folder.c: Rewrite plural test to common form.
[nmh] / uip / popsbr.c
index 16eba46d1dd70b89de866454e5873ef9c1412ac6..0d655b84613eb8d0d672829e5115f11c9e56d066 100644 (file)
@@ -1,5 +1,4 @@
-/*
- * popsbr.c -- POP client subroutines
+/* popsbr.c -- POP client subroutines
  *
  * This code is Copyright (c) 2002, by the authors of nmh.  See the
  * COPYRIGHT file in the root directory of the nmh distribution for
  *
  * This code is Copyright (c) 2002, by the authors of nmh.  See the
  * COPYRIGHT file in the root directory of the nmh distribution for
@@ -272,7 +271,7 @@ pop_init (char *host, char *port, char *user, char *proxy, int snoop,
            strncpy (buffer, response, sizeof(buffer));
            command ("QUIT");
            strncpy (response, buffer, sizeof(response));
            strncpy (buffer, response, sizeof(buffer));
            command ("QUIT");
            strncpy (response, buffer, sizeof(response));
-                               /* and fall */
+           /* FALLTHRU */
 
        case NOTOK: 
        case DONE: 
 
        case NOTOK: 
        case DONE: 
@@ -731,11 +730,11 @@ pop_getline (char *s, int n, netsec_context *ns)
      *
      * We get a length back from netsec_readline, but the rest of the POP
      * code doesn't handle it; the assumptions are that everything from
      *
      * We get a length back from netsec_readline, but the rest of the POP
      * code doesn't handle it; the assumptions are that everything from
-     * the network can be respresented as C strings.  That should get fixed
+     * the network can be represented as C strings.  That should get fixed
      * someday.
      */
 
      * someday.
      */
 
-    destlen = len < ((size_t) (n - 1)) ? len : (size_t) (n - 1);
+    destlen = min(len, (size_t)(n - 1));
 
     memcpy(s, p, destlen);
     s[destlen] = '\0';
 
     memcpy(s, p, destlen);
     s[destlen] = '\0';