mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-13 04:34:35 +03:00
Reduce variable scope
Also avoid declaring variables of different type, pointer and array, in the same line.
This commit is contained in:

committed by
BenBE

parent
b9fdf1c2a1
commit
7891cdc552
@ -134,8 +134,9 @@ static void Settings_readFields(Settings* settings, const char* line) {
|
||||
}
|
||||
|
||||
// Dynamically-defined columns are always stored by-name.
|
||||
char* end, dynamic[32] = {0};
|
||||
char dynamic[32] = {0};
|
||||
if (sscanf(ids[i], "Dynamic(%30s)", dynamic)) {
|
||||
char* end;
|
||||
if ((end = strrchr(dynamic, ')')) == NULL)
|
||||
continue;
|
||||
*end = '\0';
|
||||
|
Reference in New Issue
Block a user