aboutsummaryrefslogtreecommitdiff
path: root/libbb/getpty.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbb/getpty.c')
-rw-r--r--libbb/getpty.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libbb/getpty.c b/libbb/getpty.c
index c006e34f5..36b3c6842 100644
--- a/libbb/getpty.c
+++ b/libbb/getpty.c
@@ -10,7 +10,9 @@
10 10
11#define DEBUG 0 11#define DEBUG 0
12 12
13int getpty(char *line, int size) 13#define DEBUG 0
14
15int getpty(char *line)
14{ 16{
15 int p; 17 int p;
16#if ENABLE_FEATURE_DEVPTS 18#if ENABLE_FEATURE_DEVPTS
@@ -24,7 +26,7 @@ int getpty(char *line, int size)
24 bb_perror_msg("ptsname error (is /dev/pts mounted?)"); 26 bb_perror_msg("ptsname error (is /dev/pts mounted?)");
25 return -1; 27 return -1;
26 } 28 }
27 safe_strncpy(line, name, size); 29 safe_strncpy(line, name, GETPTY_BUFSIZE);
28 return p; 30 return p;
29 } 31 }
30#else 32#else