mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-22 09:57:41 +00:00
Prefer putchar over fputc where possible
putchar is easier to understand than fputc and printf and does less work than those two do.
This commit is contained in:
parent
7fc7d69532
commit
725d3fdc20
@ -940,14 +940,14 @@ qprintf(const char *str, Char *s)
|
|||||||
|
|
||||||
(void)printf("%s:\n", str);
|
(void)printf("%s:\n", str);
|
||||||
for (p = s; *p; p++)
|
for (p = s; *p; p++)
|
||||||
(void)fputc(CHAR(*p), stdout);
|
(void)putchar(CHAR(*p));
|
||||||
(void)fputc('\n', stdout);
|
(void)putchar('\n');
|
||||||
for (p = s; *p; p++)
|
for (p = s; *p; p++)
|
||||||
(void)fputc(*p & M_PROTECT ? '"' : ' ', stdout);
|
(void)putchar(*p & M_PROTECT ? '"' : ' ');
|
||||||
(void)fputc('\n', stdout);
|
(void)putchar('\n');
|
||||||
for (p = s; *p; p++)
|
for (p = s; *p; p++)
|
||||||
(void)fputc(ismeta(*p) ? '_' : ' ', stdout);
|
(void)putchar(ismeta(*p) ? '_' : ' ');
|
||||||
(void)fputc('\n', stdout);
|
(void)putchar('\n');
|
||||||
}
|
}
|
||||||
#endif /* DEBUG */
|
#endif /* DEBUG */
|
||||||
#endif /* HAVE_GLOB */
|
#endif /* HAVE_GLOB */
|
||||||
|
@ -315,7 +315,7 @@ dump_entry(struct timestamp_entry *entry, off_t pos)
|
|||||||
} else if (entry->type == TS_PPID) {
|
} else if (entry->type == TS_PPID) {
|
||||||
printf("parent pid: %d\n", (int)entry->u.ppid);
|
printf("parent pid: %d\n", (int)entry->u.ppid);
|
||||||
}
|
}
|
||||||
fputc('\n', stdout);
|
putchar('\n');
|
||||||
|
|
||||||
debug_return;
|
debug_return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user