aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2015-06-17 16:07:39 +0200
committerBjörn-Egil Dahlberg <[email protected]>2015-06-17 16:07:39 +0200
commitaae5a947a0c1c6dc6881cf9e5d81b7363055a04d (patch)
tree977d67e0775854029d24f0fbbae5cbe44127260d /erts/emulator
parent4f757bb53f501a02f6e297eab1e13c6cc8c9eddb (diff)
parentdaa9b4d4522f397e418610cf7746441c684bc44a (diff)
downloadotp-aae5a947a0c1c6dc6881cf9e5d81b7363055a04d.tar.gz
otp-aae5a947a0c1c6dc6881cf9e5d81b7363055a04d.tar.bz2
otp-aae5a947a0c1c6dc6881cf9e5d81b7363055a04d.zip
Merge branch 'egil/refactor-close'
* egil/refactor-close: erts: Add brackets to statement
Diffstat (limited to 'erts/emulator')
-rw-r--r--erts/emulator/sys/unix/erl_child_setup.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/erts/emulator/sys/unix/erl_child_setup.c b/erts/emulator/sys/unix/erl_child_setup.c
index d050748703..e1d2f66b7e 100644
--- a/erts/emulator/sys/unix/erl_child_setup.c
+++ b/erts/emulator/sys/unix/erl_child_setup.c
@@ -107,14 +107,16 @@ main(int argc, char *argv[])
if (from <= to) {
int spfd = system_properties_fd();
for (i = from; i <= to; i++) {
- if (i != spfd)
+ if (i != spfd) {
(void) close(i);
+ }
}
}
-#else
- for (i = from; i <= to; i++)
+#else /* !__ANDROID__ */
+ for (i = from; i <= to; i++) {
(void) close(i);
-#endif
+ }
+#endif /* HAVE_CLOSEFROM */
if (!(argv[CS_ARGV_WD_IX][0] == '.' && argv[CS_ARGV_WD_IX][1] == '\0')
&& chdir(argv[CS_ARGV_WD_IX]) < 0)