[LTP] [PATCH v2] Add tst_parse_filesize functionality in LTP test API
Cyril Hrubis
chrubis@suse.cz
Tue Dec 7 13:56:14 CET 2021
Hi!
> > + if (str == end || (strlen(end) != 0 && strlen(end) != 1))
>
> No need for the strlen() here. what you do here is a fancy way of doing (!end[0] && !end[1]).
And of course it should be (end[0] && end[1]) that means that the string
is not terminated.
Or optionally (strlen(end) > 1) would work too.
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list