X-Git-Url: https://plomlompom.com/repos/index.html?a=blobdiff_plain;f=src%2Fclient%2Fparse.c;h=c233a9203eb210d29a4fc608f7bbd854a07ccfbc;hb=6b72c6d2208d2a6bf120ef2239c0134550ed32f0;hp=5efbaf97792ecaaa5733e52fb720e00c0da26ee1;hpb=1cb57a35a3b3cc4ec8870531ca254a655c0bdda2;p=plomrogue
diff --git a/src/client/parse.c b/src/client/parse.c
index 5efbaf9..c233a92 100644
--- a/src/client/parse.c
+++ b/src/client/parse.c
@@ -1,6 +1,6 @@
/* src/client/parse.c */
-#define _POSIX_C_SOURCE 200809L /* strdup() */
+#define _POSIX_C_SOURCE 200809L /* strdup(), snprintf() */
#include "parse.h"
#include /* size_t, NULL */
#include /* FILE, snprintf() */
@@ -31,7 +31,7 @@ extern void parse_file(char * path, void (* token_to_entry) (char *, char *))
char * errline_line = try_malloc(linemax + 1, __func__);
set_err_line_options(errline_intro, errline_line, 1);
err_line_zero();
- err_line(0 == linemax, "File is empty.");
+ err_line(!linemax, "File is empty.");
char * token0 = NULL; /* For final token_to_entry() if while() stagnates. */
char * token1 = NULL;
char * err_val = "No value given.";
@@ -65,7 +65,7 @@ extern void parsetest_defcontext(uint8_t flags)
extern void parsetest_too_many_values()
{
- err_line(NULL != token_from_line(NULL), "Too many values.");
+ err_line(!(!token_from_line(NULL)), "Too many values.");
}