mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-05 13:18:20 +03:00
cleanup: libdm simplier error comparation
When testing return value from snprintf use simplier form '>=' instead of '+1 >'.
This commit is contained in:
parent
e21d0eb90e
commit
748af97afc
@ -122,7 +122,7 @@ int dm_snprintf(char *buf, size_t bufsize, const char *format, ...)
|
||||
n = vsnprintf(buf, bufsize, format, ap);
|
||||
va_end(ap);
|
||||
|
||||
if (n < 0 || ((unsigned) n + 1 > bufsize))
|
||||
if (n < 0 || ((unsigned) n >= bufsize))
|
||||
return -1;
|
||||
|
||||
return n;
|
||||
|
Loading…
Reference in New Issue
Block a user