diff options
author | chip <chip> | 2000-02-26 08:41:47 +0000 |
---|---|---|
committer | chip <chip> | 2000-02-26 08:41:47 +0000 |
commit | b4080e866ea058fb93e76f845689dae4f17ad559 (patch) | |
tree | c1bc3ce593c5bfe5bee520efff4a35972832d8fd | |
parent | 4ea2edafb88ba0280b3bf4eba6c3a3402aaade76 (diff) | |
download | nfs-utils-b4080e866ea058fb93e76f845689dae4f17ad559.tar.gz nfs-utils-b4080e866ea058fb93e76f845689dae4f17ad559.tar.xz nfs-utils-b4080e866ea058fb93e76f845689dae4f17ad559.zip |
Fix typo in previous change.
-rw-r--r-- | support/nfs/xio.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/support/nfs/xio.c b/support/nfs/xio.c index de51a15..49ee6bc 100644 --- a/support/nfs/xio.c +++ b/support/nfs/xio.c @@ -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 |