diff options
| author | Joerg Wunsch <joerg@FreeBSD.org> | 1996-10-21 23:56:23 +0000 |
|---|---|---|
| committer | Joerg Wunsch <joerg@FreeBSD.org> | 1996-10-21 23:56:23 +0000 |
| commit | a098bfd7756b42dea4f52d9d4f98d56874632a63 (patch) | |
| tree | 4b22b758119f1269569742b044cd5130e15efe74 /lib/libc/gen/getttyent.c | |
| parent | 54223c4d83843f147025a50b439cafc0a1350f0e (diff) | |
Notes
Diffstat (limited to 'lib/libc/gen/getttyent.c')
| -rw-r--r-- | lib/libc/gen/getttyent.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/gen/getttyent.c b/lib/libc/gen/getttyent.c index a4b31aa54f7d..2cd965dceab5 100644 --- a/lib/libc/gen/getttyent.c +++ b/lib/libc/gen/getttyent.c @@ -82,11 +82,11 @@ getttyent() while (!index(p, '\n')) { i = strlen(p); lbsize += MALLOCCHUNK; - if ((line = realloc(line, lbsize)) == NULL) { + if ((p = realloc(line, lbsize)) == NULL) { (void)endttyent(); return (NULL); } - p = line; + line = p; if (!fgets(&line[i], lbsize - i, tf)) return (NULL); } |
