1
0
mirror of https://github.com/moparisthebest/pacman synced 2025-02-28 17:31:52 -05:00

patch: check strlen of str, NOT msg, which is always true

This commit is contained in:
Judd Vinet 2006-05-15 16:36:35 +00:00
parent bb787e26ee
commit 1a30bc554d

View File

@ -45,6 +45,10 @@ void cb_log(unsigned short level, char *msg)
{
char str[9] = "";
if(!strlen(msg)) {
return;
}
switch(level) {
case PM_LOG_DEBUG:
sprintf(str, _("debug"));
@ -69,9 +73,7 @@ void cb_log(unsigned short level, char *msg)
break;
}
if(strlen(str) > 0) {
MSG(NL, "%s: %s\n", str, msg);
}
MSG(NL, "%s: %s\n", str, msg);
}
/* Wrapper to fprintf() that allows to choose if we want the output