]> git.dujemihanovic.xyz Git - u-boot.git/commit
lib: strto: fix metric suffix parsing in strtoul[l]
authorMiquel Raynal <miquel.raynal@bootlin.com>
Thu, 6 Sep 2018 07:08:44 +0000 (09:08 +0200)
committerJagan Teki <jagan@amarulasolutions.com>
Thu, 20 Sep 2018 14:41:01 +0000 (20:11 +0530)
commitb87b0d8d79e05f85e4f18200eac4283d513c3f3c
treefd7d9f081c794c300828f3eb2c479ff983e8e2dc
parenta353e6aa8ec8f0aa101cc7e9543fe7843ddc6d98
lib: strto: fix metric suffix parsing in strtoul[l]

While 1kB or 1kiB will be parsed correctly, 1k will return the right
amount, but the metric suffix will not be escaped once the char
pointer updated. Fix this situation by simplifying the move of the
endp pointer.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Stefan Roese <sr@denx.de>
lib/strto.c