diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2014-01-31 19:38:36 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2014-02-17 14:15:43 -0500 |
commit | d15b0107d6f0f10e259a8937f7695e2130d5e9e4 (patch) | |
tree | 2d0416c5a71d7d822cb16c2fe7d60ed604a5a739 /src/fw | |
parent | 2a3ed1eb9583625b318bbb26458926394b80901e (diff) | |
download | seabios-d15b0107d6f0f10e259a8937f7695e2130d5e9e4.tar.gz |
Enhance nullTrailingSpace() so that it can also skip leading spaces.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/fw')
-rw-r--r-- | src/fw/coreboot.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/fw/coreboot.c b/src/fw/coreboot.c index cfb7a702..2f39e3e2 100644 --- a/src/fw/coreboot.c +++ b/src/fw/coreboot.c @@ -419,18 +419,15 @@ coreboot_cbfs_init(void) next = strchr(linkname, '\n'); if (next) *next++ = '\0'; - while (*linkname && *linkname <= ' ') - linkname++; char *comment = strchr(linkname, '#'); if (comment) *comment = '\0'; - nullTrailingSpace(linkname); + linkname = nullTrailingSpace(linkname); char *destname = strchr(linkname, ' '); if (!destname) continue; *destname++ = '\0'; - while (*destname && *destname <= ' ') - destname++; + destname = nullTrailingSpace(destname); // Lookup destname and create new romfile entry for linkname struct romfile_s *ufile = romfile_find(destname); if (!ufile) |