summaryrefslogtreecommitdiffstats
path: root/common/sys
diff options
context:
space:
mode:
authorwens <wens@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-04-09 19:27:57 +0800
committerwens <wens@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-04-09 19:27:57 +0800
commit2320c0c0743af362779009ae09dee8053df9738b (patch)
tree6921e3e80ae691a66e54c0ce1aad766b75cf0f4f /common/sys
parent42b76714d581d697344a6bf4d047b1b9a62cba6b (diff)
downloadpttbbs-2320c0c0743af362779009ae09dee8053df9738b.tar
pttbbs-2320c0c0743af362779009ae09dee8053df9738b.tar.gz
pttbbs-2320c0c0743af362779009ae09dee8053df9738b.tar.bz2
pttbbs-2320c0c0743af362779009ae09dee8053df9738b.tar.lz
pttbbs-2320c0c0743af362779009ae09dee8053df9738b.tar.xz
pttbbs-2320c0c0743af362779009ae09dee8053df9738b.tar.zst
pttbbs-2320c0c0743af362779009ae09dee8053df9738b.zip
fix if/else sequence
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4117 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'common/sys')
-rw-r--r--common/sys/net.c4
1 files 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");