ifconfig: code shrink

adjtimex: code shrink
libbb: move nth_string function into libbb
hdparm: nth_string was here

   text    data     bss     dec     hex filename
 730013   10334   12032  752379   b7afb busybox_old
 730093   10134   12032  752259   b7a83 busybox_unstripped
This commit is contained in:
Denis Vlasenko
2007-11-04 04:10:17 +00:00
parent 681023650e
commit bfc3d82256
5 changed files with 128 additions and 103 deletions

@ -67,3 +67,12 @@ int index_in_substrings(const char *strings, const char *key)
}
return -1;
}
const char *nth_string(const char *strings, int n)
{
while (n) {
n--;
strings += strlen(strings) + 1;
}
return strings;
}