summaryrefslogtreecommitdiffstats
path: root/src/libusbmuxd.c
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2023-03-01 15:31:56 +0100
committerGravatar Nikias Bassen2023-03-01 15:31:56 +0100
commit4e14ae142f998bfdcad71f3099c0e4aa3628354c (patch)
treeae1f4d8abc6f05f9b2e49ba0181bc044154942b2 /src/libusbmuxd.c
parent2cebd288e73d85e0abc09155616315f952ba1f4c (diff)
downloadlibusbmuxd-4e14ae142f998bfdcad71f3099c0e4aa3628354c.tar.gz
libusbmuxd-4e14ae142f998bfdcad71f3099c0e4aa3628354c.tar.bz2
Add cast to prevent sign-compare compiler warning
Diffstat (limited to 'src/libusbmuxd.c')
-rw-r--r--src/libusbmuxd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libusbmuxd.c b/src/libusbmuxd.c
index 23d549b..cfb34a2 100644
--- a/src/libusbmuxd.c
+++ b/src/libusbmuxd.c
@@ -701,11 +701,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 (((size_t)(p-tmpbuf) < r) && (*p != '(') && (*p != '\0')) p++;
if (*p == '(') {
p++;
char *pname = p;
- while ((p-tmpbuf < r) && (*p != ')') && (*p != '\0')) p++;
+ while (((size_t)(p-tmpbuf) < r) && (*p != ')') && (*p != '\0')) p++;
if (*p == ')') {
*p = '\0';
prog_name = strdup(pname);