diff options
author | robin <robin@cvs.openbsd.org> | 1996-12-11 17:05:26 +0000 |
---|---|---|
committer | robin <robin@cvs.openbsd.org> | 1996-12-11 17:05:26 +0000 |
commit | 04765fc55f6ba51faecf680a580b95ece3a6536c (patch) | |
tree | ba213617bb37f03b135e07b7254ec4d92b0bc040 /include | |
parent | 1e06e88051b2279e894d15de99535363b51a7281 (diff) |
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).
Diffstat (limited to 'include')
-rw-r--r-- | include/arpa/telnet.h | 2 |
1 files changed, 1 insertions, 1 deletions
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 |