diff options
| author | Toomas Soome <tsoome@me.com> | 2019-01-26 19:04:49 +0200 |
|---|---|---|
| committer | Toomas Soome <tsoome@me.com> | 2019-07-30 23:16:51 +0300 |
| commit | 9b73ad49e885405d1de7968ac2e3d8c72087aa7d (patch) | |
| tree | c515ae8325e055721b701f5e44fb7fd675eaf059 | |
| parent | df8910b3b3628a21874ee73195c149a955fce3a3 (diff) | |
| download | illumos-joyent-9b73ad49e885405d1de7968ac2e3d8c72087aa7d.tar.gz | |
11444 vi: NULL pointer errors
Reviewed by: Andy Fiddaman <andy@omniosce.org>
Approved by: Dan McDonald <danmcd@joyent.com>
| -rw-r--r-- | usr/src/cmd/vi/misc/ctags.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/usr/src/cmd/vi/misc/ctags.c b/usr/src/cmd/vi/misc/ctags.c index d6e2de739b..84d4a427ab 100644 --- a/usr/src/cmd/vi/misc/ctags.c +++ b/usr/src/cmd/vi/misc/ctags.c @@ -28,7 +28,7 @@ * e.g. classz ::afunc * * Enhance operator functions support: - * - Control flow involving operator tokens scanning are + * - Control flow involving operator tokens scanning are * consistent with that of other function tokens - original * hacking method for 2.0 is removed. This will accurately * identify tags for declarations of the form 'operator+()' @@ -69,7 +69,7 @@ char copyright[] = "@(#) Copyright (c) 1980 Regents of the University of " #define endtoken(arg) (_etk[arg]) /* T if char ends tokens */ #define isgood(arg) (_gd[arg]) /* T if char can be after ')' */ -#define optoken(arg) (_opr[arg]) /* T if char can be */ +#define optoken(arg) (_opr[arg]) /* T if char can be */ /* an overloaded operator token */ #define max(I1, I2) (I1 > I2 ? I1 : I2) @@ -104,7 +104,7 @@ typedef enum {none, begin, begin_rec, begin_tag, middle, end } TYST; static TYST tydef = none; -static char searchar = '/'; /* use /.../ searches */ +static char searchar = '/'; /* use /.../ searches */ static int lineno; /* line number of current line */ static char @@ -141,7 +141,7 @@ static FILE *inf, /* ioptr for current input file */ *outf; /* ioptr for tags file */ -static long lineftell; /* ftell after getc( inf ) == '\n' */ +static long lineftell; /* ftell after getc( inf ) == '\n' */ static NODE *head; /* the head of the sorted binary tree */ @@ -354,9 +354,9 @@ char *file; /* .l implies lisp or lex source code */ if (cp && cp[1] == 'l' && cp[2] == '\0') { #ifdef __STDC__ - if (strchr(";([", first_char()) != NULL) /* lisp */ + if (strchr(";([", first_char()) != NULL) /* lisp */ #else - if (index(";([", first_char()) != NULL) /* lisp */ + if (index(";([", first_char()) != NULL) /* lisp */ #endif { L_funcs(inf); @@ -545,7 +545,7 @@ C_entries() continue; case '/': *++sp = c = getc(inf); - /* Handles the C++ comment token "//" */ + /* Handles the C++ comment token "//" */ if (c == '*') incomm = TRUE; else if (c == '/') { @@ -1451,7 +1451,7 @@ char **av; /* ptr to original argument space */ } /* for each argument, see if we need to change things: */ - for (; (av[i] != (char *)NULL) && (av[i][0] != (char)NULL); i++) { + for (; (av[i] != NULL) && (av[i][0] != '\0'); i++) { if (strcmp(av[i], "--") == 0) { fflag = 1; /* just handle filenames now */ @@ -1466,7 +1466,7 @@ char **av; /* ptr to original argument space */ * * so, if we've found a "-" string which needs separating: */ - if (fflag == 0 && /* not handling filename args */ + if (fflag == 0 && /* not handling filename args */ av[i][0] == '-' && /* and this is a flag */ sz > 2) { /* and there's more than 1 flag */ /* then for each flag after the "-" sign: */ |
