summaryrefslogtreecommitdiff
path: root/libdm/libdm-string.c
diff options
context:
space:
mode:
authorAlasdair Kergon <agk@redhat.com>2007-04-27 14:52:41 +0000
committerAlasdair Kergon <agk@redhat.com>2007-04-27 14:52:41 +0000
commit8d2b0f24d352d902800219f04cff680e9ebc0431 (patch)
tree2a01e0dcf644d3ebd9a46f13ba4953288c871e54 /libdm/libdm-string.c
parent30b95041de31b2c2627623bf02500db411203e2e (diff)
downloadlvm2-8d2b0f24d352d902800219f04cff680e9ebc0431.tar.gz
Deal with some more compiler warnings. Hope this doesn't break anything...
Diffstat (limited to 'libdm/libdm-string.c')
-rw-r--r--libdm/libdm-string.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libdm/libdm-string.c b/libdm/libdm-string.c
index 698111c2b..4b6a8368a 100644
--- a/libdm/libdm-string.c
+++ b/libdm/libdm-string.c
@@ -117,7 +117,7 @@ int dm_snprintf(char *buf, size_t bufsize, const char *format, ...)
n = vsnprintf(buf, bufsize, format, ap);
va_end(ap);
- if (n < 0 || (n > bufsize - 1))
+ if (n < 0 || ((unsigned) n + 1 > bufsize))
return -1;
return n;