aboutsummaryrefslogtreecommitdiff
path: root/src/util.cpp
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@exmulti.com>2012-04-22 13:51:16 -0400
committerJeff Garzik <jgarzik@redhat.com>2012-04-23 14:14:36 -0400
commit1d8c7a9557d596d4c7edee801a724db7a908bce5 (patch)
tree5181d28a1c69ecc7c58ba4b0b15417d6817aa949 /src/util.cpp
parentc0a0a93d02251390b482d4a147531989641c5a98 (diff)
Add casts for unavoidable signed/unsigned comparisons
At these code sites, it is preferable to cast rather than change a variable's type.
Diffstat (limited to 'src/util.cpp')
-rw-r--r--src/util.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util.cpp b/src/util.cpp
index 9f2de3449d..016e9deb0c 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -283,7 +283,7 @@ int my_snprintf(char* buffer, size_t limit, const char* format, ...)
va_start(arg_ptr, format);
int ret = _vsnprintf(buffer, limit, format, arg_ptr);
va_end(arg_ptr);
- if (ret < 0 || ret >= limit)
+ if (ret < 0 || ret >= (int)limit)
{
ret = limit - 1;
buffer[limit-1] = 0;