Lines Matching refs:buf
37 char *buf = *pts; in pts_name() local
45 rv = __ptsname_r (fd, buf, buf_len); in pts_name()
47 if (rv != 0 || memchr (buf, '\0', buf_len)) in pts_name()
59 if (buf != *pts) in pts_name()
61 new_buf = realloc (buf, buf_len); in pts_name()
70 buf = new_buf; in pts_name()
74 *pts = buf; /* Return buffer to the user. */ in pts_name()
75 else if (buf != *pts) in pts_name()
76 free (buf); /* Free what we malloced when returning an error. */ in pts_name()
93 char *buf = _buf; in __openpty() local
96 *buf = '\0'; in __openpty()
117 if (pts_name (ptmx, &buf, sizeof (_buf))) in __openpty()
120 terminal = __open64 (buf, O_RDWR | O_NOCTTY); in __openpty()
137 if (*buf == '\0') in __openpty()
138 if (pts_name (ptmx, &buf, sizeof (_buf))) in __openpty()
141 strcpy (name, buf); in __openpty()
154 if (buf != _buf) in __openpty()
155 free (buf); in __openpty()