forked from enlightenment/efl
eina - Fix compilation warning in eina_log_print_cb_journald.
vasprintf can return -1, in which case the buffer is corrupted. So we better handle this ... gcc told me of this thanks to -Wunused-result when building package, thank you gcc for your incredible powers.
This commit is contained in:
parent
1073bfcd44
commit
ec3d13d6c9
|
@ -1907,8 +1907,14 @@ eina_log_print_cb_journald(const Eina_Log_Domain *d,
|
|||
char buf[12];
|
||||
char *tmp;
|
||||
Eina_Thread cur;
|
||||
int r;
|
||||
|
||||
vasprintf(&tmp, fmt, args);
|
||||
r = vasprintf(&tmp, fmt, args);
|
||||
if (r == -1)
|
||||
{
|
||||
fputs("ERR: eina_log_print_cb_journald() vasprintf failed\n");
|
||||
return;
|
||||
}
|
||||
|
||||
eina_convert_itoa(line, buf);
|
||||
|
||||
|
|
Loading…
Reference in New Issue