diff options
author | Ingo Bürk | 2018-06-22 13:55:09 +0200 |
---|---|---|
committer | GitHub | 2018-06-22 13:55:09 +0200 |
commit | 4d3344ab9cd68bad5faf4ed3dad185dfcacb1e3d (patch) | |
tree | 66846b5f6023291fda2d72fe523d4ee0614d2a1f /src/print_mem.c | |
parent | Merge pull request #289 from bebehei/testsuite (diff) | |
parent | Prevent potential crash if glob() fails (diff) |
Merge pull request #290 from duskCoder/changes
Fix potential issues & avoid unnecessary instructions
Diffstat (limited to 'src/print_mem.c')
-rw-r--r-- | src/print_mem.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/print_mem.c b/src/print_mem.c index 46523d6..a37fa29 100644 --- a/src/print_mem.c +++ b/src/print_mem.c @@ -39,10 +39,9 @@ static int print_bytes_human(char *outwalk, uint64_t bytes) { * */ static long memory_absolute(const long mem_total, const char *size) { - long mem_absolute = -1; char *endptr = NULL; - mem_absolute = strtol(size, &endptr, 10); + long mem_absolute = strtol(size, &endptr, 10); if (endptr) { while (endptr[0] != '\0' && isspace(endptr[0])) |