mirror of
https://github.com/yshui/picom.git
synced 2024-11-11 13:51:02 -05:00
Fix some static analyzer errors
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
parent
51d03132bf
commit
669cbcdb14
1 changed files with 4 additions and 0 deletions
|
@ -48,6 +48,10 @@ log_default_writev(struct log_target *tgt, const struct iovec *vec, int vcnt) {
|
|||
total += vec[i].iov_len;
|
||||
}
|
||||
|
||||
if (!total) {
|
||||
// Nothing to write
|
||||
return;
|
||||
}
|
||||
char *buf = ccalloc(total, char);
|
||||
total = 0;
|
||||
for (int i = 0; i < vcnt; i++) {
|
||||
|
|
Loading…
Reference in a new issue