summaryrefslogtreecommitdiffstats
path: root/XUtils.c
diff options
context:
space:
mode:
authorNathan Scott <nathans@redhat.com>2020-12-07 11:41:22 +1100
committerNathan Scott <nathans@redhat.com>2020-12-07 11:41:22 +1100
commitb92cfa7d7ac09b4e8a3c377496edd49228221f72 (patch)
treeaefa244b8140e21e2d02018e57c7b9fa0c7d23ec /XUtils.c
parent57d9ecc5519a44d4d08f1739ab4b741ccfc2d35a (diff)
parentad764ff972082608604634c84e5427e7bfdcda1a (diff)
Merge branch 'conversion' of https://github.com/cgzones/htop into cgzones-conversion
Diffstat (limited to 'XUtils.c')
-rw-r--r--XUtils.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/XUtils.c b/XUtils.c
index 743d98bf..cd5edb91 100644
--- a/XUtils.c
+++ b/XUtils.c
@@ -184,13 +184,13 @@ int xAsprintf(char** strp, const char* fmt, ...) {
return r;
}
-int xSnprintf(char* buf, int len, const char* fmt, ...) {
+int xSnprintf(char* buf, size_t len, const char* fmt, ...) {
va_list vl;
va_start(vl, fmt);
int n = vsnprintf(buf, len, fmt, vl);
va_end(vl);
- if (n < 0 || n >= len) {
+ if (n < 0 || (size_t)n >= len) {
fail();
}

© 2014-2024 Faster IT GmbH | imprint | privacy policy