diff options
author | Jari Vetoniemi <mailroxas@gmail.com> | 2019-02-24 13:35:01 +0200 |
---|---|---|
committer | Jari Vetoniemi <mailroxas@gmail.com> | 2019-02-24 13:35:01 +0200 |
commit | 11d0d93576cd834b5126529daa736d4b4b62330e (patch) | |
tree | bb60c61e2d20e93d0ffd4c54e5c77f602dcd85cf /src | |
parent | 85360e74b094028024bb65c2f2b4e836afc1dae4 (diff) |
memview: remove name_sz check
It's useless, snprintf is sane. Lets just accept the weird input.
Diffstat (limited to 'src')
-rw-r--r-- | src/memview.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/memview.c b/src/memview.c index c639099..8c2a792 100644 --- a/src/memview.c +++ b/src/memview.c @@ -917,7 +917,7 @@ region_cb(const char *line, void *data) char *name; size_t name_sz = region_len_without_name + 1 + strlen(base) + 1; - if (name_sz > 1 && !(name = malloc(name_sz))) + if (!(name = malloc(name_sz))) err(EXIT_FAILURE, "malloc"); snprintf(name, name_sz, "%.*s %s", region_len_without_name, line, base); |