use sizeof instead of fix value

This commit is contained in:
Dominik Geyer 2008-09-30 17:10:19 +00:00
parent 9266f242c3
commit fb3e8dec79

View file

@ -1101,7 +1101,7 @@ void gui_messagebox(const char *title, const char *message)
#elif defined(CONF_FAMILY_UNIX)
static char cmd[1024];
/* use xmessage which is available on nearly every X11 system */
snprintf(cmd, 1024, "xmessage -center -title '%s' '%s'",
snprintf(cmd, sizeof(cmd), "xmessage -center -title '%s' '%s'",
title,
message);