MINOR: tools: make url2ipv4 return the exact number of bytes parsed
authorWilly Tarreau <w@1wt.eu>
Thu, 25 Mar 2021 10:34:40 +0000 (11:34 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 25 Mar 2021 14:53:57 +0000 (15:53 +0100)
commit4d61bdbe244f43d7c1c9356564ee5863542c005b
treeba8c8a780ef1353059d9359aa61c1e219bf2cea4
parentfc583641657c6d385182f2ed0ef3b3a89c5fad24
MINOR: tools: make url2ipv4 return the exact number of bytes parsed

The function's return value is currently used as a boolean but we'll
need it to return the number of bytes parsed. Right now it returns
it minus one, unless the last char doesn't match what is permitted.
Let's update this to make it more usable.

(cherry picked from commit 12e1027aa6c7687b5638c0c9260696266c9e400b)
Signed-off-by: Willy Tarreau <w@1wt.eu>
src/tools.c