From 2320c0c0743af362779009ae09dee8053df9738b Mon Sep 17 00:00:00 2001 From: wens Date: Wed, 9 Apr 2008 11:27:57 +0000 Subject: fix if/else sequence git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4117 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- common/sys/net.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/sys/net.c b/common/sys/net.c index 10f5a351..0e6d98c9 100644 --- a/common/sys/net.c +++ b/common/sys/net.c @@ -36,7 +36,7 @@ int tobind(const char * host, int port) { int sockfd, val = 1; - if (host != NULL && isdigit(host[0])) { + if (host != NULL && !isdigit(host[0])) { struct sockaddr_un servaddr; if ( (sockfd = socket(AF_UNIX, SOCK_STREAM, 0)) < 0 ) { @@ -89,7 +89,7 @@ int toconnect(const char *host, int port) { int sock; - if (isdigit(host[0])) { + if (!isdigit(host[0])) { struct sockaddr_un serv_name; if ( (sock = socket(AF_UNIX, SOCK_STREAM, 0)) < 0 ) { perror("socket"); -- cgit v1.2.3