mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-01 23:25:38 +00:00
convert to fgets
This commit is contained in:
@@ -69,8 +69,12 @@ main(int argc, char *argv[]) {
|
|||||||
RUNTIME_CHECK(isc_symtab_create(mctx, 691, undefine_action,
|
RUNTIME_CHECK(isc_symtab_create(mctx, 691, undefine_action,
|
||||||
case_sensitive, &st) == ISC_R_SUCCESS);
|
case_sensitive, &st) == ISC_R_SUCCESS);
|
||||||
|
|
||||||
while (gets(s) != NULL) {
|
while (fgets(s, sizeof s, stdin) != NULL) {
|
||||||
len = strlen(s);
|
len = strlen(s);
|
||||||
|
if (len > 0 && s[len - 1] == '\n') {
|
||||||
|
s[len - 1] = '\0';
|
||||||
|
len--;
|
||||||
|
}
|
||||||
|
|
||||||
cp = s;
|
cp = s;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user