]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
Fix typo in previous change.
authorchip <chip>
Sat, 26 Feb 2000 08:41:47 +0000 (08:41 +0000)
committerchip <chip>
Sat, 26 Feb 2000 08:41:47 +0000 (08:41 +0000)
support/nfs/xio.c

index de51a15c0a8d4b6d30d4f7c77a1b284057671e7b..49ee6bc2eac3da43fc0d0dccd4330f7ccf38edaf 100644 (file)
@@ -92,7 +92,7 @@ xgettok(XFILE *xfp, char sepa, char *tok, int len)
        while (i < len && (c = xgetc(xfp)) != EOF && c != sepa && !isspace(c))
                tok[i++] = c;
        if (c == '\n')
-               xungetc(c, xfp->x_fp);
+               xungetc(c, xfp);
        if (!i)
                return 0;
        if (i >= len || (sepa && c != sepa))
@@ -128,11 +128,12 @@ xgetc(XFILE *xfp)
 void
 xungetc(int c, XFILE *xfp)
 {
-       if (c != EOF) {
-               ungetc(c, xfp->x_fp);
-               if (c == '\n')
-                       xfp->x_line--;
-       }
+       if (c == EOF)
+               return;
+
+       ungetc(c, xfp->x_fp);
+       if (c == '\n')
+               xfp->x_line--;
 }
 
 void