summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJari Vetoniemi <mailroxas@gmail.com>2019-02-24 13:35:01 +0200
committerJari Vetoniemi <mailroxas@gmail.com>2019-02-24 13:35:01 +0200
commit11d0d93576cd834b5126529daa736d4b4b62330e (patch)
treebb60c61e2d20e93d0ffd4c54e5c77f602dcd85cf /src
parent85360e74b094028024bb65c2f2b4e836afc1dae4 (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.c2
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);