| # | Line 41 | Line 41 | char *get_memory_stats(){ | |
|---|---|---|
| 41 | #ifdef LINUX | |
| 42 | FILE *f; | |
| 43 | char *line; | |
| 44 | < | long buffers; |
| 44 | > | long long buffers; |
| 45 | #endif | |
| 46 | #ifdef SOLARIS | |
| 47 | kstat_ctl_t *kc; | |
| # | Line 67 | Line 67 | char *get_memory_stats(){ | |
| 67 | } | |
| 68 | while((line=fpgetline(f)) != NULL){ | |
| 69 | if (((strncmp(line,"Mem:",4)) == 0)) { | |
| 70 | < | if((sscanf(line, "%*s %ld %ld %ld %*s %ld %ld", &total, &used, &free, &buffers, &cache)) != 5){ |
| 70 | > | if((sscanf(line, "%*s %lld %lld %lld %*s %lld %lld", &total, &used, &free, &buffers, &cache)) != 5){ |
| 71 | errf("Failed to read memory details (%m)"); | |
| 72 | return NULL; | |
| 73 | } | |
| – | Removed lines |
| + | Added lines |
| < | Changed lines |
| > | Changed lines |