Ensure curly-braces around control-flow
[folly.git] / folly / io / async / AsyncSocket.cpp
index 991b225c13ed57c84ce70471779104039913d4c5..a6fbe6fe28f73ae4e60d71b1d01785c9b07c170c 100644 (file)
@@ -2692,7 +2692,9 @@ void AsyncSocket::invalidState(WriteCallback* callback) {
 }
 
 void AsyncSocket::doClose() {
 }
 
 void AsyncSocket::doClose() {
-  if (fd_ == -1) return;
+  if (fd_ == -1) {
+    return;
+  }
   if (const auto shutdownSocketSet = wShutdownSocketSet_.lock()) {
     shutdownSocketSet->close(fd_);
   } else {
   if (const auto shutdownSocketSet = wShutdownSocketSet_.lock()) {
     shutdownSocketSet->close(fd_);
   } else {