]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
replace-gets-with-fgets-20001104
authorDerrick Brashear <shadow@andrew.cmu.edu>
Sun, 5 Nov 2000 02:21:42 +0000 (02:21 +0000)
committerDerrick Brashear <shadow@dementia.org>
Sun, 5 Nov 2000 02:21:42 +0000 (02:21 +0000)
replace gets with fgets
based as patch from nneul@umr.edu

src/kauth/client.c
src/viced/fsprobe.c
src/vlserver/vlclient.c

index 34609d19771c482123d268fa2533ece5168b55a9..4e7f3c4e3d794e88e95c82eda211f359f2b63b1a 100644 (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);
 
index 35d5c021a47ffc7eda2fb705936ea6e1f868d068..2bc1f245131f6a080fd66963289d502ca9f76b44 100644 (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);
index b9dcbf25e0447514e9a8f2fa289b22a3084bd568..82a27d5c9eb46769604ab75e83fc41f9c268eab3 100644 (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 {