Another nice cleanup from Larry. This adds a new last_char_is() function and
uses it to avoid possible buffer underruns whn strlen is zero, and avoid the possible space-hogging inline of strlen() in several cases. -Erik
This commit is contained in:
parent
3c3277f0bd
commit
c1bdffe99b
12 changed files with 46 additions and 11 deletions
|
@ -75,7 +75,7 @@ static void decompose_list(const char *list)
|
|||
/* handle multi-value cases */
|
||||
else if (nminus == 1) {
|
||||
/* handle 'N-' case */
|
||||
if (list[strlen(list) - 1] == '-') {
|
||||
if (last_char_is(list,'-')) {
|
||||
startpos = strtol(list, &ptr, 10);
|
||||
}
|
||||
/* handle '-M' case */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue