mirror of
https://github.com/systemd/systemd.git
synced 2024-11-01 17:51:22 +03:00
hexdcoct: dump to stdout if FILE* is specified as NULL
We do a logic like that at various other places, let's do it here too, to make this as little surprising as possible.
This commit is contained in:
parent
ae6e414a61
commit
a3ab8f2a99
@ -737,7 +737,10 @@ void hexdump(FILE *f, const void *p, size_t s) {
|
||||
const uint8_t *b = p;
|
||||
unsigned n = 0;
|
||||
|
||||
assert(s == 0 || b);
|
||||
assert(b || s == 0);
|
||||
|
||||
if (!f)
|
||||
f = stdout;
|
||||
|
||||
while (s > 0) {
|
||||
size_t i;
|
||||
|
Loading…
Reference in New Issue
Block a user