]> granicus.if.org Git - mutt/commitdiff
Fix the Fix. From TK.
authorThomas Roessler <roessler@does-not-exist.org>
Wed, 5 Jul 2000 14:39:14 +0000 (14:39 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Wed, 5 Jul 2000 14:39:14 +0000 (14:39 +0000)
imap/socket.c

index aea2b69d00fe225c108b9d725ae889a9dd3786c8..d621f923387398cb082ab7223e1e433f0fbf2324 100644 (file)
@@ -231,9 +231,9 @@ static int try_socket_and_connect (CONNECTION *conn, struct sockaddr_in sin,
 
 int raw_socket_close (CONNECTION *conn)
 {
-  /* Close the descriptor and set it to -1 if successful.
-   * Returns the error code from close */
-  return close (conn->fd) || !(conn->fd = -1);
+  int ret = close (conn->fd);
+  if (ret == 0) conn->fd = -1;
+  return ret;
 }
 
 int raw_socket_read (CONNECTION *conn)