2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

convert to fgets

This commit is contained in:
Bob Halley
1999-04-28 00:30:23 +00:00
parent 116208651c
commit 075a8494bd

View File

@@ -69,8 +69,12 @@ main(int argc, char *argv[]) {
RUNTIME_CHECK(isc_symtab_create(mctx, 691, undefine_action,
case_sensitive, &st) == ISC_R_SUCCESS);
while (gets(s) != NULL) {
while (fgets(s, sizeof s, stdin) != NULL) {
len = strlen(s);
if (len > 0 && s[len - 1] == '\n') {
s[len - 1] = '\0';
len--;
}
cp = s;