mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-21 12:24:58 +00:00
filebuf: use an int for return check
This commit is contained in:
parent
f1453c59b2
commit
8aab36a301
@ -446,10 +446,10 @@ int git_filebuf_printf(git_filebuf *file, const char *format, ...)
|
|||||||
}
|
}
|
||||||
|
|
||||||
va_start(arglist, format);
|
va_start(arglist, format);
|
||||||
len = p_vsnprintf(tmp_buffer, len + 1, format, arglist);
|
written = p_vsnprintf(tmp_buffer, len + 1, format, arglist);
|
||||||
va_end(arglist);
|
va_end(arglist);
|
||||||
|
|
||||||
if (len < 0) {
|
if (written < 0) {
|
||||||
git__free(tmp_buffer);
|
git__free(tmp_buffer);
|
||||||
file->last_error = BUFERR_MEM;
|
file->last_error = BUFERR_MEM;
|
||||||
return -1;
|
return -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user