Allow callers to skip their own NULL checks and just assume that parse_size64() handles the NULL case.
Signed-off-by: Dan Williams <[email protected]> --- util/size.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/util/size.c b/util/size.c index f54ae5b870b8..6efa91f6eef9 100644 --- a/util/size.c +++ b/util/size.c @@ -65,5 +65,7 @@ unsigned long long __parse_size64(const char *str, unsigned long long *units) unsigned long long parse_size64(const char *str) { + if (!str) + return 0; return __parse_size64(str, NULL); } _______________________________________________ Linux-nvdimm mailing list -- [email protected] To unsubscribe send an email to [email protected]
