artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f9a6283
)
Fix SLC_NAME_OK() macro which would return non-zero, if given the
author
robin
<robin@openbsd.org>
Wed, 11 Dec 1996 17:05:25 +0000
(17:05 +0000)
committer
robin
<robin@openbsd.org>
Wed, 11 Dec 1996 17:05:25 +0000
(17:05 +0000)
argument: 0 (which is not a valid SLC code -- valid SLC codes are currently
1 -> 30 inclusive, from RFC-1184).
include/arpa/telnet.h
patch
|
blob
|
history
diff --git
a/include/arpa/telnet.h
b/include/arpa/telnet.h
index
5ab526a
..
f396e10
100644
(file)
--- 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