summaryrefslogtreecommitdiff
path: root/src/sp_config_utils.c
diff options
context:
space:
mode:
authorjvoisin2017-10-22 21:24:03 +0200
committerjvoisin2017-10-22 21:24:03 +0200
commit9bb7ab846f85052413d51e1cdbea8f8776950ddb (patch)
treea34ccfce257ee4f36e5df3f450646870d3baf43f /src/sp_config_utils.c
parentdfb9eb6f82e1393947229f1c09febc3806ab825a (diff)
Improve an error message
Diffstat (limited to 'src/sp_config_utils.c')
-rw-r--r--src/sp_config_utils.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/sp_config_utils.c b/src/sp_config_utils.c
index b0c7d3c..f562ffd 100644
--- a/src/sp_config_utils.c
+++ b/src/sp_config_utils.c
@@ -107,9 +107,13 @@ static char *get_string(size_t *consumed, char *restrict line,
107 ret[j++] = line[i]; 107 ret[j++] = line[i];
108 } 108 }
109err: 109err:
110 sp_log_err("error", 110 if (0 == j) {
111 "There is an issue with the parsing of '%s': it doesn't look like a valid string on line %zu.", 111 sp_log_err("error", "A valid string as parameter is expected on line %zu.", sp_line_no);
112 original_line ? original_line : "NULL", sp_line_no); 112 } else {
113 sp_log_err("error",
114 "There is an issue with the parsing of '%s': it doesn't look like a valid string on line %zu.",
115 original_line ? original_line : "NULL", sp_line_no);
116}
113 line = NULL; 117 line = NULL;
114 return NULL; 118 return NULL;
115} 119}