Right now the return value is initialized to -1 (failure) and set to zero
only if a valid token is found. However, this means that i.e. a blank
or template config file containing only comments will yield failure on
parsing.
Initialize to success, and set to failure only if failure occurs.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Reviewed-by: Luis R. Rodriguez <mcgrof@kernel.org>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
const char *config_file,
FILE *fp)
{
- int ret = -1;
+ int ret = 0;
char *line = NULL;
ssize_t linelen;
size_t len = 0, lineno = 0;