X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/addfa67219772fbfa4f9db8c2cd0be620d40b0eb..bc1c5b66a229c7ee977c3ea6b2d4d8bfd031c15f:/usr/src/usr.bin/tn3270/api/astosc.c diff --git a/usr/src/usr.bin/tn3270/api/astosc.c b/usr/src/usr.bin/tn3270/api/astosc.c index 4df5756466..a3ada1efe5 100644 --- a/usr/src/usr.bin/tn3270/api/astosc.c +++ b/usr/src/usr.bin/tn3270/api/astosc.c @@ -5,7 +5,6 @@ #include "../ctlr/function.h" #include "astosc.h" -#include "state.h" struct astosc astosc[256] = { #include "astosc.out" @@ -43,8 +42,8 @@ register char *string2; /* * This routine takes a string and returns an integer. It may return - * STATE_NULL if there is no other integer which corresponds to the - * string. STATE_NULL implies an error. + * -1 if there is no other integer which corresponds to the + * string. -1 implies an error. */ int @@ -54,9 +53,9 @@ register char *string; register struct astosc *this; for (this = astosc; this <= &astosc[highestof(astosc)]; this++) { - if (ustrcmp(this->name, string) == 0) { + if ((this->name != 0) && (ustrcmp(this->name, string) == 0)) { return this-astosc; } } - return STATE_NULL; + return -1; }