]> Pileus Git - ~andy/fetchmail/commitdiff
Sunil's code-duplication cleanup patch.
authorEric S. Raymond <esr@thyrsus.com>
Sat, 22 Jun 2002 20:47:26 +0000 (20:47 -0000)
committerEric S. Raymond <esr@thyrsus.com>
Sat, 22 Jun 2002 20:47:26 +0000 (20:47 -0000)
svn path=/trunk/; revision=3651

socket.c

index 4c32898f646fbc8c316bccc575dd41c8506dab79..f1bea9f650c8fba51630d2f3522a24533e6a8c3a 100644 (file)
--- a/socket.c
+++ b/socket.c
@@ -525,10 +525,8 @@ int SockWrite(int sock, char *buf, int len)
        if( NULL != ( ssl = SSLGetContext( sock ) ) )
                n = SSL_write(ssl, buf, len);
        else
-               n = fm_write(sock, buf, len);
-#else
-        n = fm_write(sock, buf, len);
-#endif
+#endif /* SSL_ENABLE */
+           n = fm_write(sock, buf, len);
         if (n <= 0)
             return -1;
         len -= n;
@@ -676,14 +674,10 @@ int SockPeek(int sock)
 
                        return 0;       /* Give him a '\0' character */
                }
-       } else {
-               n = fm_peek(sock, &ch, 1);
        }
-#else
-
-        n = fm_peek(sock, &ch, 1);
-
+       else
 #endif /* SSL_ENABLE */
+           n = fm_peek(sock, &ch, 1);
        if (n == -1)
                return -1;