cb: fix a null pointer dereference
Just added a pair of parentheses. I also ran cb on cb.c to beautify the code. This is actually on Gerrit from 2016: https://plan9port-review.googlesource.com/c/plan9/+/1574 Change-Id: I5e234adba0f95c13d6eecb121bf11bba4bf54566
This commit is contained in:
parent
a1ead676e6
commit
ab6f1aeac7
1 changed files with 3 additions and 3 deletions
|
|
@ -29,7 +29,7 @@ main(int argc, char *argv[])
|
|||
maxleng -= (maxleng + 5)/10;
|
||||
continue;
|
||||
default:
|
||||
fprint(2, "cb: illegal option %c\n", *argv[1]);
|
||||
fprint(2, "cb: illegal option %c\n", (*argv)[1]);
|
||||
exits("boom");
|
||||
}
|
||||
}
|
||||
|
|
@ -969,7 +969,7 @@ cont:
|
|||
if(nlct++ > 2)goto done;
|
||||
}
|
||||
puttmp(c,1);
|
||||
star:
|
||||
star:
|
||||
if(puttmp((c=Bgetc(input)),1) == '/'){
|
||||
beg = tp;
|
||||
puttmp((c=Bgetc(input)),1);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue