Maximum value of uint32_t should be UINT32_MAX instead of ULONG_MAX Fixes tautological-constant-out-of-range-compare warning. Bug: 72331526 Test: presubmit AOSP-Change: 1173604 Change-Id: Ie71f5a57fad298a9cb035b5e7430af617b438ab8 Merged-In: Ie71f5a57fad298a9cb035b5e7430af617b438ab8 (cherry picked from commit 7c0e9992d953850fd08c1f0f26cc3dcc24c61c4f)
diff --git a/apf_run.c b/apf_run.c index 8597959..0b36b0e 100644 --- a/apf_run.c +++ b/apf_run.c
@@ -237,7 +237,7 @@ case OPT_AGE: errno = 0; filter_age = strtoul(optarg, &endptr, 10); - if ((errno == ERANGE && filter_age == ULONG_MAX) || + if ((errno == ERANGE && filter_age == UINT32_MAX) || (errno != 0 && filter_age == 0)) { perror("Error on age option: strtoul"); exit(1);