summaryrefslogtreecommitdiff
path: root/test/testnames.c
diff options
context:
space:
mode:
authorRyan Bloom <rbb@apache.org>2001-04-09 04:57:46 +0000
committerRyan Bloom <rbb@apache.org>2001-04-09 04:57:46 +0000
commit85c8d167362b5f42eea842b8dfb97e5a8b97a709 (patch)
treea829ce7794daaaa4dc4f6cbe63957e94a014ba4c /test/testnames.c
parent4e4c2fd2a5ae53cd466daffca64b3f73474bdf08 (diff)
downloadapr-85c8d167362b5f42eea842b8dfb97e5a8b97a709.tar.gz
gets is an unsafe function, and it outputs and error message on Linux.
Using fgets makes this compile quietly. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@61488 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/testnames.c')
-rw-r--r--test/testnames.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/testnames.c b/test/testnames.c
index d9c31e248..02372686a 100644
--- a/test/testnames.c
+++ b/test/testnames.c
@@ -115,10 +115,10 @@ int main(void)
while (1) {
fprintf(stdout, "\nEnter a root path$ ");
- if (!gets(rootpath))
+ if (!fgets(rootpath, 256, stdin))
exit(0);
fprintf(stdout, "Enter an add path$ ");
- if (!gets(addpath))
+ if (!fgets(addpath, 256, stdin))
exit(0);
merge_result(rootpath, addpath, 0);
merge_result(rootpath, addpath, APR_FILEPATH_NOTABOVEROOT);