]> git.sur5r.net Git - i3/i3status/blobdiff - src/print_mem.c
Avoid assigning a new value to a var before using the old value
[i3/i3status] / src / print_mem.c
index 46523d6ce67c48560622eb0d787bd2e798e6feca..a37fa2905c142fd9c65925b0cd83ca86e5faded8 100644 (file)
@@ -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]))