mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
notify: consume_stdout(): fix ASAN warning
This is an ASAN false positive; size is always 0 when we're passing a NULL pointer. Still, the warning is easy to avoid, so let's do that to reduce the noise level.
This commit is contained in:
parent
e59efb1233
commit
fabfef9c82
1 changed files with 4 additions and 2 deletions
6
notify.c
6
notify.c
|
|
@ -63,8 +63,10 @@ consume_stdout(struct notification *notif, bool eof)
|
|||
left -= len + (eol != NULL ? 1 : 0);
|
||||
}
|
||||
|
||||
memmove(notif->stdout_data, data, left);
|
||||
notif->stdout_sz = left;
|
||||
if (left > 0) {
|
||||
memmove(notif->stdout_data, data, left);
|
||||
notif->stdout_sz = left;
|
||||
}
|
||||
}
|
||||
|
||||
static bool
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue