Created attachment 683 [details] patch: remove two unneeded unsigned comparison cases I've run across some gcc warnings which included these things. It would be probably better to either remove them or replace with their signed counterparts. Patch attached.
applied, thanks! in ah, the code can be shrank there by using bb_strtou[l[ll]]: - val = (rlim_t) 0; - - while ((c = *p++) >= '0' && c <= '9') { - val = (val * 10) + (long)(c - '0'); - // val is actually 'unsigned long int' and can't get < 0 - if (val < (rlim_t) 0) - break; - } - if (c) + if (sizeof(val) == sizeof(int)) + val = bb_strtou(p, NULL, 10); + else if (sizeof(val) == sizeof(long)) + val = bb_strtoul(p, NULL, 10); + else + val = bb_strtoull(p, NULL, 10); + if (errno) ash_msg_and_raise_error("bad number");