more warning cleanup

The use of strncat and eos(buf) together was odd anyway.
This commit is contained in:
nhmall
2026-06-26 14:56:26 -04:00
parent e3407a923f
commit c40bf4658d
+6 -5
View File
@@ -3033,8 +3033,8 @@ optfn_paranoid_confirmation(
" %s", paranoia[i].argname);
}
/* note: always leaves enough room for caller to tack on '\n' */
opts[0] = '\0';
(void) strncat(opts, tmpbuf[0] ? &tmpbuf[1] : "none", BUFSZ - 1);
Snprintf(opts, BUFSZ - 1, "%s",
tmpbuf[0] ? &tmpbuf[1] : "none");
return optn_ok;
}
if (req == do_handler) {
@@ -8965,9 +8965,10 @@ doset(void) /* changing options via menu by Per Liboriussen */
getlin(buf, abuf);
if (abuf[0] == '\033')
continue;
Sprintf(buf, "%s:", allopt[opt_indx].name);
(void) strncat(eos(buf), abuf,
(sizeof buf - 1 - strlen(buf)));
Snprintf(buf, sizeof buf,
"%s:%s",
allopt[opt_indx].name,
abuf);
/* pass the buck */
(void) parseoptions(buf, FALSE, FALSE);
}