hacklib.c NONNULL functions
A bunch of routines return a pointer which is never Null but weren't telling the compiler that such was the case. A couple (strsubst(), stripchars()) were accepting Null output argument and then returning Null, but callers had no reason to use them that way, so they've been changed. (upstart() could have been changed similarly; I've already forgotten why I left it as-is.)
This commit is contained in:
@@ -3460,7 +3460,7 @@ config_erradd(const char *buf)
|
||||
|
||||
/* if buf[] doesn't end in a period, exclamation point, or question mark,
|
||||
we'll include a period (in the message, not appended to buf[]) */
|
||||
punct = eos((char *) buf) - 1; /* eos(buf)-1 is valid; cast away const */
|
||||
punct = c_eos((char *) buf) - 1; /* eos(buf)-1 is valid */
|
||||
punct = strchr(".!?", *punct) ? "" : ".";
|
||||
|
||||
if (!gp.program_state.config_error_ready) {
|
||||
|
||||
Reference in New Issue
Block a user