summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/libusbmuxd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libusbmuxd.c b/src/libusbmuxd.c
index 712c362..379a948 100644
--- a/src/libusbmuxd.c
+++ b/src/libusbmuxd.c
@@ -535,11 +535,11 @@ static void get_prog_name()
size_t r = fread(tmpbuf, 1, 512, f);
if (r > 0) {
char *p = tmpbuf;
- while ((p-tmpbuf < r) && (*p != '(') && (*p != '\0')) p++;
+ while ((p-tmpbuf < (ssize_t)r) && (*p != '(') && (*p != '\0')) p++;
if (*p == '(') {
p++;
char *pname = p;
- while ((p-tmpbuf < r) && (*p != ')') && (*p != '\0')) p++;
+ while ((p-tmpbuf < (ssize_t)r) && (*p != ')') && (*p != '\0')) p++;
if (*p == ')') {
*p = '\0';
prog_name = strdup(pname);