projects
/
folly.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Ensure curly-braces around control-flow
[folly.git]
/
folly
/
io
/
async
/
AsyncServerSocket.cpp
diff --git
a/folly/io/async/AsyncServerSocket.cpp
b/folly/io/async/AsyncServerSocket.cpp
index 72f29d0caef2daaae17bfade745a5fdee6f2413d..908a95b6865fd6465a4eab52ff1db8cb9a6d1156 100644
(file)
--- a/
folly/io/async/AsyncServerSocket.cpp
+++ b/
folly/io/async/AsyncServerSocket.cpp
@@
-55,15
+55,17
@@
int setCloseOnExec(int fd, int value) {
int old_flags = fcntl(fd, F_GETFD, 0);
// If reading the flags failed, return error indication now
int old_flags = fcntl(fd, F_GETFD, 0);
// If reading the flags failed, return error indication now
- if (old_flags < 0)
+ if (old_flags < 0)
{
return -1;
return -1;
+ }
// Set just the flag we want to set
int new_flags;
// Set just the flag we want to set
int new_flags;
- if (value != 0)
+ if (value != 0)
{
new_flags = old_flags | FD_CLOEXEC;
new_flags = old_flags | FD_CLOEXEC;
- else
+ } else {
new_flags = old_flags & ~FD_CLOEXEC;
new_flags = old_flags & ~FD_CLOEXEC;
+ }
// Store modified flag word in the descriptor
return fcntl(fd, F_SETFD, new_flags);
// Store modified flag word in the descriptor
return fcntl(fd, F_SETFD, new_flags);