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:
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user