From 9723d466d51e2b9790e975224f5c6cf348921559 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Wed, 24 Jul 2019 17:57:32 +0200 Subject: libfstree: fix signed/unsigned comparisons Signed-off-by: David Oberhollenzer --- lib/fstree/fstree.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/fstree/fstree.c b/lib/fstree/fstree.c index 1bbb678..553809b 100644 --- a/lib/fstree/fstree.c +++ b/lib/fstree/fstree.c @@ -42,7 +42,7 @@ static int process_defaults(struct stat *sb, char *subopts) lval = strtol(value, NULL, 0); if (lval < 0) goto fail_uv; - if (lval > 0xFFFFFFFFL) + if (lval > (long)INT32_MAX) goto fail_ov; sb->st_uid = lval; break; @@ -50,7 +50,7 @@ static int process_defaults(struct stat *sb, char *subopts) lval = strtol(value, NULL, 0); if (lval < 0) goto fail_uv; - if (lval > 0xFFFFFFFFL) + if (lval > (long)INT32_MAX) goto fail_ov; sb->st_gid = lval; break; @@ -66,7 +66,7 @@ static int process_defaults(struct stat *sb, char *subopts) lval = strtol(value, NULL, 0); if (lval < 0) goto fail_uv; - if (lval > 0xFFFFFFFFL) + if (lval > (long)INT32_MAX) goto fail_ov; sb->st_mtime = lval; break; -- cgit v1.2.3