diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 2020-06-18 18:34:59 -0400 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 2020-06-18 18:34:59 -0400 |
commit | a9d6701d977700b18e31a70cc7982431bc702095 (patch) | |
tree | eb24677e90094a95c1461243b56e83309a47742b /src/session.c | |
parent | d2b4f0598086d4dd5caf3cdc218d0f97c37229ac (diff) |
fix the cppcheck style- and format-warnings
also bump version to 1.0.11.1, reflecting ongoing work since release
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
Diffstat (limited to 'src/session.c')
-rw-r--r-- | src/session.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/session.c b/src/session.c index ed8bb33..94b4d63 100644 --- a/src/session.c +++ b/src/session.c @@ -274,7 +274,7 @@ WriteWinConfigEntry(FILE *configFile, TwmWindow *theWindow, char *clientId, char *windowRole) { char **wm_command; - int wm_command_count, i; + int wm_command_count; if (!write_counted_string(configFile, clientId)) return 0; @@ -311,6 +311,8 @@ WriteWinConfigEntry(FILE *configFile, TwmWindow *theWindow, return 0; } else { + int i; + if (!write_byte(configFile, (unsigned char) wm_command_count)) return 0; for (i = 0; i < wm_command_count; i++) @@ -574,12 +576,14 @@ GetWindowConfig(TwmWindow *theWindow, */ char **wm_command = NULL; - int wm_command_count = 0, i; + int wm_command_count = 0; XGetCommand(dpy, theWindow->w, &wm_command, &wm_command_count); if (wm_command_count == ptr->wm_command_count) { + int i; + for (i = 0; i < wm_command_count; i++) if (strcmp(wm_command[i], ptr->wm_command[i]) != 0) |