replace-gets-with-fgets-20001104

replace gets with fgets
based as patch from nneul@umr.edu
This commit is contained in:
Derrick Brashear 2000-11-05 02:21:42 +00:00 committed by Derrick Brashear
parent 0977f32648
commit 17fdc9038a
3 changed files with 3 additions and 3 deletions

View File

@ -319,7 +319,7 @@ int main (void)
char cell[MAXKTCREALMLEN];
printf("Enter login:");
gets (line);
fgets (line, 255, stdin);
ka_ParseLoginName (line, name, instance, cell);
printf ("'%s' '%s' '%s'\n", name, instance, cell);

View File

@ -128,7 +128,7 @@ main(argc, argv)
int nargs;
printf("fs> ");
if (gets(line) != NULL) {
if (fgets(line, 499, stdin) != NULL) {
char *oper;
register char **argp = args;
GetArgs(line, argp, &nargs);

View File

@ -286,7 +286,7 @@ static handleit(as)
bzero(&updateentry, sizeof(updateentry));
bzero(&listbyattributes, sizeof(listbyattributes));
printf("vl> ");
if (gets(line) == NULL) {
if (fgets(line, 499, stdin) == NULL) {
printf("\n");
exit(0);
} else {