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