indent(1): Yet more style issues.
strchr(3) returns a pointer not a boolean. Attempt to make the style somewhat more ocnsistent with what indent had before recent changes. Pointed out by: bde
This commit is contained in:
parent
dd47921eac
commit
e643b783e3
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=303525
@ -342,8 +342,8 @@ main(int argc, char **argv)
|
||||
case comment: /* we have a comment, so we must copy it into
|
||||
* the buffer */
|
||||
if (!flushed_nl || sc_end != NULL) {
|
||||
if (sc_end == NULL) { /* if this is the first comment, we
|
||||
* must set up the buffer */
|
||||
if (sc_end == NULL) { /* if this is the first comment, we
|
||||
* must set up the buffer */
|
||||
save_com[0] = save_com[1] = ' ';
|
||||
sc_end = &(save_com[2]);
|
||||
}
|
||||
@ -1100,8 +1100,8 @@ main(int argc, char **argv)
|
||||
|
||||
while (e_lab > s_lab && (e_lab[-1] == ' ' || e_lab[-1] == '\t'))
|
||||
e_lab--;
|
||||
/* comment on preprocessor line */
|
||||
if (e_lab - s_lab == com_end && bp_save == NULL) {
|
||||
/* comment on preprocessor line */
|
||||
if (sc_end == NULL) /* if this is the first comment, we
|
||||
* must set up the buffer */
|
||||
sc_end = &(save_com[0]);
|
||||
|
@ -348,8 +348,8 @@ fill_buffer(void)
|
||||
int i;
|
||||
FILE *f = input;
|
||||
|
||||
if (bp_save != NULL) { /* there is a partly filled input buffer left */
|
||||
buf_ptr = bp_save; /* dont read anything, just switch buffers */
|
||||
if (bp_save != NULL) { /* there is a partly filled input buffer left */
|
||||
buf_ptr = bp_save; /* do not read anything, just switch buffers */
|
||||
buf_end = be_save;
|
||||
bp_save = be_save = NULL;
|
||||
if (buf_ptr < buf_end)
|
||||
|
@ -197,7 +197,7 @@ lexi(void)
|
||||
seensfx |= 1;
|
||||
continue;
|
||||
}
|
||||
if (!(seensfx & 2) && strchr("fFlL", *buf_ptr)) {
|
||||
if (!(seensfx & 2) && (strchr("fFlL", *buf_ptr) != NULL)) {
|
||||
CHECK_SIZE_TOKEN;
|
||||
if (buf_ptr[1] == buf_ptr[0])
|
||||
*e_token++ = *buf_ptr++;
|
||||
|
Loading…
Reference in New Issue
Block a user