diff options
author | Oliver Kiddle <opk@zsh.org> | 2022-12-16 23:22:33 +0100 |
---|---|---|
committer | Oliver Kiddle <opk@zsh.org> | 2022-12-16 23:28:10 +0100 |
commit | a73c705b0c864a9ce042fca6e72e0c92d4ad8237 (patch) | |
tree | 6ea60926217bfc66140a8f60bbc8c37f36396ea2 /Src/Modules/zftp.c | |
parent | 7fb6c133bfdf445b4478897adc142ed7d07b5fd6 (diff) | |
download | zsh-a73c705b0c864a9ce042fca6e72e0c92d4ad8237.tar.gz zsh-a73c705b0c864a9ce042fca6e72e0c92d4ad8237.tar.xz zsh-a73c705b0c864a9ce042fca6e72e0c92d4ad8237.zip |
51212: remove STOUC() macro
This served as a workaround for ancient compilers where casts to unsigned char were broken.
Diffstat (limited to 'Src/Modules/zftp.c')
-rw-r--r-- | Src/Modules/zftp.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Src/Modules/zftp.c b/Src/Modules/zftp.c index e8e239e76..49b3ffa89 100644 --- a/Src/Modules/zftp.c +++ b/Src/Modules/zftp.c @@ -944,9 +944,9 @@ zfopendata(char *name, union tcp_sockaddr *zdsockp, int *is_passivep) return 1; } for (i = 0; i < 4; i++) - iaddr[i] = STOUC(nums[i]); - iport[0] = STOUC(nums[4]); - iport[1] = STOUC(nums[5]); + iaddr[i] = (unsigned char) nums[i]; + iport[0] = (unsigned char) nums[4]; + iport[1] = (unsigned char) nums[5]; memcpy(&zdsockp->in.sin_addr, iaddr, sizeof(iaddr)); memcpy(&zdsockp->in.sin_port, iport, sizeof(iport)); @@ -2438,7 +2438,7 @@ zftp_type(char *name, char **args, int flags) fflush(stdout); return 0; } else { - nt = toupper(STOUC(*str)); + nt = toupper((unsigned char) *str); /* * RFC959 specifies other types, but these are the only * ones we know what to do with. @@ -2472,7 +2472,7 @@ zftp_mode(char *name, char **args, UNUSED(int flags)) fflush(stdout); return 0; } - nt = str[0] = toupper(STOUC(*str)); + nt = str[0] = toupper((unsigned char) *str); if (str[1] || (nt != 'S' && nt != 'B')) { zwarnnam(name, "transfer mode %s not recognised", str); return 1; @@ -3075,7 +3075,7 @@ bin_zftp(char *name, char **args, UNUSED(Options ops), UNUSED(int func)) if ((prefs = getsparam_u("ZFTP_PREFS"))) { zfprefs = 0; for (ptr = prefs; *ptr; ptr++) { - switch (toupper(STOUC(*ptr))) { + switch (toupper((unsigned char) *ptr)) { case 'S': /* sendport */ zfprefs |= ZFPF_SNDP; |