1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-01-06 05:44:11 +01:00

WPrefs: Prefer use of 'sizeof' instead of hard-coded values

Hard-coding a value is prone to errors when maintaining the code; using the
builtin C macro 'sizeof' is a much safer choice.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
Christophe CURIS
2019-02-22 15:48:14 +01:00
committed by Carlos R. Mafra
parent 738a78b3e2
commit dae63b5e96

View File

@@ -1512,7 +1512,7 @@ static void showData(_Panel * panel)
break;
if (access(path, W_OK) < 0) {
snprintf(buf, 1024,
snprintf(buf, sizeof(buf),
_("The menu file \"%s\" referenced by "
"WMRootMenu is read-only.\n"
"You cannot use WPrefs to modify it."),
@@ -1554,7 +1554,7 @@ static void showData(_Panel * panel)
panel->menuPath = menuPath;
snprintf(buf, 1024,
snprintf(buf, sizeof(buf),
_("\n\nWhen saved, the menu will be written to the file\n\"%s\"."),
menuPath);
labelText = WMGetLabelText(panel->sections[NoInfo][0]);