[PATCH] Optimize config_read()
Timo Teräs
timo.teras at iki.fi
Fri Aug 8 12:01:07 UTC 2008
Vladimir Dronnikov wrote:
> line 190 of your diff:
>
> + i += strcspn(&line[i], delims);
>
> I predict there will be problems if I pass "\0 \t" as delims, which is a
> perfectly valid case for not having comment chars at all.
You're right.
Fixed as: "i += strcspn(&line[i], delims[0] ? delims : delims + 1);"
There was also some problems with comment in the greedy last token.
I think it should be right now.
Please consider this for applying.
- Timo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bb-optimize-config-read-v2.diff
Type: text/x-diff
Size: 7283 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20080808/4b98450a/attachment.bin
More information about the busybox
mailing list