about summary refs log tree commit diff
path: root/Src/Modules/socket.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@zsh.org>2015-10-29 15:01:07 +0000
committerPeter Stephenson <pws@zsh.org>2015-10-29 15:01:07 +0000
commit0628802baf5c9245138db82dd058cad023a7d0ae (patch)
treebdbc600fe01ccbac2fb1b34814626a53f909c806 /Src/Modules/socket.c
parent9640e9f497e8d78bf0bfa9defc4cfdeba1e7bfae (diff)
downloadzsh-0628802baf5c9245138db82dd058cad023a7d0ae.tar.gz
zsh-0628802baf5c9245138db82dd058cad023a7d0ae.tar.xz
zsh-0628802baf5c9245138db82dd058cad023a7d0ae.zip
37014: Improved internal parameter setting.
Enhance WARNCREATEGLOBAL to work in many more cases.

Don't create REPLY as an integer if it didn't previously exist
as one, even if the value to be set is integral, as this is likely to
mess up later uses of REPLY.
Diffstat (limited to 'Src/Modules/socket.c')
-rw-r--r--Src/Modules/socket.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Src/Modules/socket.c b/Src/Modules/socket.c
index f683496df..7c3fb5ebe 100644
--- a/Src/Modules/socket.c
+++ b/Src/Modules/socket.c
@@ -132,7 +132,7 @@ bin_zsocket(char *nam, char **args, Options ops, UNUSED(int func))
 	/* allow to be closed explicitly */
 	fdtable[sfd] = FDT_EXTERNAL;
 
-	setiparam("REPLY", sfd);
+	setiparam_no_convert("REPLY", (zlong)sfd);
 
 	if (verbose)
 	    printf("%s listener is on fd %d\n", soun.sun_path, sfd);
@@ -220,7 +220,7 @@ bin_zsocket(char *nam, char **args, Options ops, UNUSED(int func))
 	    sfd = rfd;
 	}
 
-	setiparam("REPLY", sfd);
+	setiparam_no_convert("REPLY", (zlong)sfd);
 
 	if (verbose)
 	    printf("new connection from %s is on fd %d\n", soun.sun_path, sfd);
@@ -261,7 +261,7 @@ bin_zsocket(char *nam, char **args, Options ops, UNUSED(int func))
 		fdtable[sfd] = FDT_EXTERNAL;
 	    }
 
-	    setiparam("REPLY", sfd);
+	    setiparam_no_convert("REPLY", (zlong)sfd);
 
 	    if (verbose)
 		printf("%s is now on fd %d\n", soun.sun_path, sfd);