From af0841dd0b27dec11b552a2a8b8280456d356cea Mon Sep 17 00:00:00 2001 From: robin Date: Wed, 11 Dec 1996 17:05:25 +0000 Subject: [PATCH] Fix SLC_NAME_OK() macro which would return non-zero, if given the argument: 0 (which is not a valid SLC code -- valid SLC codes are currently 1 -> 30 inclusive, from RFC-1184). --- include/arpa/telnet.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/arpa/telnet.h b/include/arpa/telnet.h index 5ab526a45bc..f396e1050dc 100644 --- a/include/arpa/telnet.h +++ b/include/arpa/telnet.h @@ -235,7 +235,7 @@ extern char *slc_names[]; #define SLC_NAMES SLC_NAMELIST #endif -#define SLC_NAME_OK(x) ((unsigned int)(x) <= NSLC) +#define SLC_NAME_OK(x) ((unsigned)(x) > 0 && (unsigned)(x) <= NSLC) #define SLC_NAME(x) slc_names[x] #define SLC_NOSUPPORT 0 -- 2.20.1