Avoid assigning a new value to a var before using the old value
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
This commit is contained in:
parent
598b76cc53
commit
a6dd14c8c6
@ -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]))
|
||||
|
Loading…
Reference in New Issue
Block a user