diff options
author | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2004-01-08 15:54:00 +0800 |
---|---|---|
committer | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2004-01-08 15:54:00 +0800 |
commit | 271bcfc4e7d98aafb59b6e67399244f635ee74e8 (patch) | |
tree | 6c8c84e636581109db1de66d4036441c36b607c8 /innbbsd/port.c | |
parent | 9b4d34a17c6061171456ae8e4b63dcd270f53091 (diff) | |
download | pttbbs-271bcfc4e7d98aafb59b6e67399244f635ee74e8.tar pttbbs-271bcfc4e7d98aafb59b6e67399244f635ee74e8.tar.gz pttbbs-271bcfc4e7d98aafb59b6e67399244f635ee74e8.tar.bz2 pttbbs-271bcfc4e7d98aafb59b6e67399244f635ee74e8.tar.lz pttbbs-271bcfc4e7d98aafb59b6e67399244f635ee74e8.tar.xz pttbbs-271bcfc4e7d98aafb59b6e67399244f635ee74e8.tar.zst pttbbs-271bcfc4e7d98aafb59b6e67399244f635ee74e8.zip |
indent -i4
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1473 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'innbbsd/port.c')
-rw-r--r-- | innbbsd/port.c | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/innbbsd/port.c b/innbbsd/port.c index 65e91fa4..8962ea14 100644 --- a/innbbsd/port.c +++ b/innbbsd/port.c @@ -5,24 +5,29 @@ #include <sys/resource.h> getdtablesize() { - struct rlimit limit; - if (getrlimit(RLIMIT_NOFILE, &limit) >= 0){ - return limit.rlim_cur; - } - return -1; + struct rlimit limit; + if (getrlimit(RLIMIT_NOFILE, &limit) >= 0) { + return limit.rlim_cur; + } + return -1; } #endif #if defined(SYSV) && !defined(WITH_RECORD_O) #include <fcntl.h> flock(fd, op) -int fd,op; + int fd, op; { - switch (op) { - case LOCK_EX: op = F_LOCK; break; - case LOCK_UN: op = F_ULOCK; break; - default: return -1; - } - return lockf(fd, op, 0L); + switch (op) { + case LOCK_EX: + op = F_LOCK; + break; + case LOCK_UN: + op = F_ULOCK; + break; + default: + return -1; + } + return lockf(fd, op, 0L); } #endif |