]> diplodocus.org Git - nmh/blobdiff - uip/popsbr.c
Remove unused NCWD and NPWD #defines.
[nmh] / uip / popsbr.c
index fa9b99d1e542dcddc208350b7d184feb4d538758..8d2cf9d726dafe4ef96ff41c633014b134d77f67 100644 (file)
@@ -240,6 +240,8 @@ pop_init (char *host, char *port, char *user, char *proxy, int snoop,
            if (poprint)
                fprintf (stderr, "<--- %s\n", response);
            if (*response == '+') {
+                nmh_creds_t creds;
+
                if (sasl) {
                    char server_mechs[256];
                    if (check_mech(server_mechs, sizeof(server_mechs)) != OK)
@@ -253,7 +255,6 @@ pop_init (char *host, char *port, char *user, char *proxy, int snoop,
                    }
                    return OK;
                }
-                nmh_creds_t creds;
 
                 if (!(creds = nmh_get_credentials(host, user)))
                     return NOTOK;
@@ -433,7 +434,7 @@ pop_sasl_callback(enum sasl_message_type mtype, unsigned const char *indata,
        if (line == NULL)
            return NOTOK;
 
-       if (strncmp(line, "+OK", 3) != 0) {
+       if (!HasPrefix(line, "+OK")) {
            netsec_err(errstr, "Authentication failed: %s", line);
            return NOTOK;
        }
@@ -689,7 +690,7 @@ multiline (void)
 
     if (pop_getline (buffer, sizeof buffer, nsc) != OK)
        return NOTOK;
-    if (strncmp (buffer, TRM, TRMLEN) == 0) {
+    if (HasPrefix(buffer, TRM)) {
        if (buffer[TRMLEN] == 0)
            return DONE;
         strncpy (response, buffer + TRMLEN, sizeof(response));