summaryrefslogtreecommitdiffstats
path: root/generic/tclIOCmd.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2017-04-10 09:35:51 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2017-04-10 09:35:51 (GMT)
commit3c4cc0a0013a0552c90518a995ae654571c18a5b (patch)
tree522d542088c176e4ae0d354561db29bc681b6ba4 /generic/tclIOCmd.c
parentd64611a414a4e8609b17ae27dc02969200d2fa37 (diff)
parentd00198bd14d66e196b9640683d02023b8a0b2dd7 (diff)
downloadtcl-3c4cc0a0013a0552c90518a995ae654571c18a5b.zip
tcl-3c4cc0a0013a0552c90518a995ae654571c18a5b.tar.gz
tcl-3c4cc0a0013a0552c90518a995ae654571c18a5b.tar.bz2
merge (minor style issues from) trunk
Diffstat (limited to 'generic/tclIOCmd.c')
-rw-r--r--generic/tclIOCmd.c33
1 files changed, 24 insertions, 9 deletions
diff --git a/generic/tclIOCmd.c b/generic/tclIOCmd.c
index 55685e3..712f773 100644
--- a/generic/tclIOCmd.c
+++ b/generic/tclIOCmd.c
@@ -1629,19 +1629,34 @@ Tcl_SocketObjCmd(
return TCL_ERROR;
}
- // Set the options to their default value if the user didn't override their
- // value.
- if (reusep == -1) reusep = 0;
- if (reusea == -1) reusea = 1;
+ /*
+ * Set the options to their default value if the user didn't override
+ * their value.
+ */
- // Build the bitset with the flags values.
- if (reusea)
+ if (reusep == -1) {
+ reusep = 0;
+ }
+ if (reusea == -1) {
+ reusea = 1;
+ }
+
+ /*
+ * Build the bitset with the flags values.
+ */
+
+ if (reusea) {
flags |= TCL_TCPSERVER_REUSEADDR;
- if (reusep)
+ }
+ if (reusep) {
flags |= TCL_TCPSERVER_REUSEPORT;
+ }
+
+ /*
+ * All the arguments should have been parsed by now, 'a' points to the
+ * last one, the port number.
+ */
- // All the arguments should have been parsed by now, 'a' points to the last
- // one, the port number.
if (a != objc-1) {
goto wrongNumArgs;
}