diff options
author | pgen <p.gen.progs@gmail.com> | 2024-01-03 23:19:55 +0100 |
---|---|---|
committer | pgen <p.gen.progs@gmail.com> | 2024-01-03 23:19:55 +0100 |
commit | b94264e55f4ac61c1d9d39382d96eff38f115a18 (patch) | |
tree | 13ad928ea80b8fdf5ce9316feba823d3786f38ea /xmalloc.c | |
parent | 31f6f07d8b3aa4bc9e950ebc5cfc52726b987ea1 (diff) |
Normalize NULLity tests and fix a logical error
Diffstat (limited to 'xmalloc.c')
-rw-r--r-- | xmalloc.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -157,7 +157,7 @@ xstrndup(const char *str, size_t len) p = memchr(str, '\0', len); - if (p) + if (p != NULL) len = p - str; p = malloc(len + 1); |