summaryrefslogtreecommitdiff
path: root/tests/libtest
diff options
context:
space:
mode:
authorAlessandro Ghedini <alessandro@ghedini.me>2016-08-03 08:44:40 +0100
committerAlessandro Ghedini <alessandro@ghedini.me>2016-08-03 08:44:40 +0100
commitd0e75a4dd1b5dbadaafeac616c9244d95c0da0d9 (patch)
treeb9cc54b8bd1c220d36790227557a4e980eeda460 /tests/libtest
parent8651f09f51d271bf2c9defaa33a211a7092642ad (diff)
Imported Upstream version 7.50.1
Diffstat (limited to 'tests/libtest')
-rw-r--r--tests/libtest/Makefile.am7
-rw-r--r--tests/libtest/Makefile.in749
-rw-r--r--tests/libtest/Makefile.inc5
-rw-r--r--tests/libtest/chkhostname.c8
-rw-r--r--tests/libtest/first.c8
-rw-r--r--tests/libtest/lib1500.c6
-rw-r--r--tests/libtest/lib1501.c6
-rw-r--r--tests/libtest/lib1502.c7
-rw-r--r--tests/libtest/lib1506.c10
-rw-r--r--tests/libtest/lib1507.c6
-rw-r--r--tests/libtest/lib1508.c2
-rw-r--r--tests/libtest/lib1509.c2
-rw-r--r--tests/libtest/lib1510.c10
-rw-r--r--tests/libtest/lib1511.c2
-rw-r--r--tests/libtest/lib1512.c12
-rw-r--r--tests/libtest/lib1513.c2
-rw-r--r--tests/libtest/lib1514.c2
-rw-r--r--tests/libtest/lib1515.c13
-rw-r--r--tests/libtest/lib1517.c116
-rw-r--r--tests/libtest/lib1520.c2
-rw-r--r--tests/libtest/lib1525.c8
-rw-r--r--tests/libtest/lib1526.c10
-rw-r--r--tests/libtest/lib1527.c10
-rw-r--r--tests/libtest/lib1528.c6
-rw-r--r--tests/libtest/lib1529.c2
-rw-r--r--tests/libtest/lib1530.c2
-rw-r--r--tests/libtest/lib1531.c14
-rw-r--r--tests/libtest/lib1900.c12
-rw-r--r--tests/libtest/lib500.c76
-rw-r--r--tests/libtest/lib501.c8
-rw-r--r--tests/libtest/lib502.c2
-rw-r--r--tests/libtest/lib503.c2
-rw-r--r--tests/libtest/lib504.c6
-rw-r--r--tests/libtest/lib505.c25
-rw-r--r--tests/libtest/lib506.c215
-rw-r--r--tests/libtest/lib507.c2
-rw-r--r--tests/libtest/lib508.c8
-rw-r--r--tests/libtest/lib509.c8
-rw-r--r--tests/libtest/lib510.c10
-rw-r--r--tests/libtest/lib511.c8
-rw-r--r--tests/libtest/lib512.c2
-rw-r--r--tests/libtest/lib513.c8
-rw-r--r--tests/libtest/lib514.c8
-rw-r--r--tests/libtest/lib515.c8
-rw-r--r--tests/libtest/lib516.c8
-rw-r--r--tests/libtest/lib517.c2
-rw-r--r--tests/libtest/lib518.c182
-rw-r--r--tests/libtest/lib519.c8
-rw-r--r--tests/libtest/lib520.c8
-rw-r--r--tests/libtest/lib521.c8
-rw-r--r--tests/libtest/lib523.c8
-rw-r--r--tests/libtest/lib524.c8
-rw-r--r--tests/libtest/lib525.c10
-rw-r--r--tests/libtest/lib526.c2
-rw-r--r--tests/libtest/lib530.c6
-rw-r--r--tests/libtest/lib533.c2
-rw-r--r--tests/libtest/lib536.c2
-rw-r--r--tests/libtest/lib537.c179
-rw-r--r--tests/libtest/lib539.c15
-rw-r--r--tests/libtest/lib540.c10
-rw-r--r--tests/libtest/lib541.c16
-rw-r--r--tests/libtest/lib542.c10
-rw-r--r--tests/libtest/lib543.c6
-rw-r--r--tests/libtest/lib544.c8
-rw-r--r--tests/libtest/lib547.c11
-rw-r--r--tests/libtest/lib549.c8
-rw-r--r--tests/libtest/lib552.c24
-rw-r--r--tests/libtest/lib553.c14
-rw-r--r--tests/libtest/lib554.c8
-rw-r--r--tests/libtest/lib555.c9
-rw-r--r--tests/libtest/lib556.c8
-rw-r--r--tests/libtest/lib557.c62
-rw-r--r--tests/libtest/lib558.c6
-rw-r--r--tests/libtest/lib560.c2
-rw-r--r--tests/libtest/lib562.c10
-rw-r--r--tests/libtest/lib564.c2
-rw-r--r--tests/libtest/lib566.c8
-rw-r--r--tests/libtest/lib567.c8
-rw-r--r--tests/libtest/lib568.c11
-rw-r--r--tests/libtest/lib569.c11
-rw-r--r--tests/libtest/lib570.c8
-rw-r--r--tests/libtest/lib571.c13
-rw-r--r--tests/libtest/lib572.c8
-rw-r--r--tests/libtest/lib573.c10
-rw-r--r--tests/libtest/lib574.c8
-rw-r--r--tests/libtest/lib575.c2
-rw-r--r--tests/libtest/lib576.c9
-rw-r--r--tests/libtest/lib578.c16
-rw-r--r--tests/libtest/lib579.c10
-rw-r--r--tests/libtest/lib582.c55
-rw-r--r--tests/libtest/lib583.c4
-rw-r--r--tests/libtest/lib586.c103
-rw-r--r--tests/libtest/lib590.c14
-rw-r--r--tests/libtest/lib591.c2
-rw-r--r--tests/libtest/lib597.c13
-rw-r--r--tests/libtest/lib598.c8
-rw-r--r--tests/libtest/lib599.c12
-rw-r--r--tests/libtest/libauthretry.c47
-rw-r--r--tests/libtest/libntlmconnect.c50
-rw-r--r--tests/libtest/sethostname.c2
-rw-r--r--tests/libtest/sethostname.h2
-rw-r--r--tests/libtest/test.h274
-rw-r--r--tests/libtest/testtrace.c2
-rw-r--r--tests/libtest/testtrace.h2
-rw-r--r--tests/libtest/testutil.c6
-rw-r--r--tests/libtest/testutil.h2
106 files changed, 1533 insertions, 1284 deletions
diff --git a/tests/libtest/Makefile.am b/tests/libtest/Makefile.am
index d255b222..826b3d4f 100644
--- a/tests/libtest/Makefile.am
+++ b/tests/libtest/Makefile.am
@@ -5,11 +5,11 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
-# are also available at http://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.haxx.se/docs/copyright.html.
#
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
# copies of the Software, and permit persons to whom the Software is
@@ -115,3 +115,6 @@ libhostname_la_SOURCES = sethostname.c sethostname.h
libhostname_la_LIBADD =
libhostname_la_DEPENDENCIES =
+
+checksrc:
+ @PERL@ $(top_srcdir)/lib/checksrc.pl $(srcdir)/*.c
diff --git a/tests/libtest/Makefile.in b/tests/libtest/Makefile.in
index 2bb13de6..eec09b82 100644
--- a/tests/libtest/Makefile.in
+++ b/tests/libtest/Makefile.in
@@ -121,10 +121,10 @@ noinst_PROGRAMS = chkhostname$(EXEEXT) libauthretry$(EXEEXT) \
lib1506$(EXEEXT) lib1507$(EXEEXT) lib1508$(EXEEXT) \
lib1509$(EXEEXT) lib1510$(EXEEXT) lib1511$(EXEEXT) \
lib1512$(EXEEXT) lib1513$(EXEEXT) lib1514$(EXEEXT) \
- lib1515$(EXEEXT) lib1520$(EXEEXT) lib1525$(EXEEXT) \
- lib1526$(EXEEXT) lib1527$(EXEEXT) lib1528$(EXEEXT) \
- lib1529$(EXEEXT) lib1530$(EXEEXT) lib1531$(EXEEXT) \
- lib1900$(EXEEXT) lib2033$(EXEEXT)
+ lib1515$(EXEEXT) lib1517$(EXEEXT) lib1520$(EXEEXT) \
+ lib1525$(EXEEXT) lib1526$(EXEEXT) lib1527$(EXEEXT) \
+ lib1528$(EXEEXT) lib1529$(EXEEXT) lib1530$(EXEEXT) \
+ lib1531$(EXEEXT) lib1900$(EXEEXT) lib2033$(EXEEXT)
@USE_CPPFLAG_CURL_STATICLIB_TRUE@am__append_1 = -DCURL_STATICLIB
@CURL_LT_SHLIB_USE_NO_UNDEFINED_TRUE@am__append_2 = -no-undefined
@CURL_LT_SHLIB_USE_MIMPURE_TEXT_TRUE@am__append_3 = -mimpure-text
@@ -289,527 +289,532 @@ am_lib1515_OBJECTS = lib1515-lib1515.$(OBJEXT) $(am__objects_45) \
$(am__objects_46) $(am__objects_47)
lib1515_OBJECTS = $(am_lib1515_OBJECTS)
lib1515_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_48 = lib1520-first.$(OBJEXT)
-am_lib1520_OBJECTS = lib1520-lib1520.$(OBJEXT) $(am__objects_48)
+am__objects_48 = lib1517-first.$(OBJEXT)
+am_lib1517_OBJECTS = lib1517-lib1517.$(OBJEXT) $(am__objects_48)
+lib1517_OBJECTS = $(am_lib1517_OBJECTS)
+lib1517_LDADD = $(LDADD)
+lib1517_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_49 = lib1520-first.$(OBJEXT)
+am_lib1520_OBJECTS = lib1520-lib1520.$(OBJEXT) $(am__objects_49)
lib1520_OBJECTS = $(am_lib1520_OBJECTS)
lib1520_LDADD = $(LDADD)
lib1520_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_49 = lib1525-first.$(OBJEXT)
-am__objects_50 = lib1525-testutil.$(OBJEXT)
-am__objects_51 = ../../lib/lib1525-warnless.$(OBJEXT)
-am_lib1525_OBJECTS = lib1525-lib1525.$(OBJEXT) $(am__objects_49) \
- $(am__objects_50) $(am__objects_51)
+am__objects_50 = lib1525-first.$(OBJEXT)
+am__objects_51 = lib1525-testutil.$(OBJEXT)
+am__objects_52 = ../../lib/lib1525-warnless.$(OBJEXT)
+am_lib1525_OBJECTS = lib1525-lib1525.$(OBJEXT) $(am__objects_50) \
+ $(am__objects_51) $(am__objects_52)
lib1525_OBJECTS = $(am_lib1525_OBJECTS)
lib1525_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_52 = lib1526-first.$(OBJEXT)
-am__objects_53 = lib1526-testutil.$(OBJEXT)
-am__objects_54 = ../../lib/lib1526-warnless.$(OBJEXT)
-am_lib1526_OBJECTS = lib1526-lib1526.$(OBJEXT) $(am__objects_52) \
- $(am__objects_53) $(am__objects_54)
+am__objects_53 = lib1526-first.$(OBJEXT)
+am__objects_54 = lib1526-testutil.$(OBJEXT)
+am__objects_55 = ../../lib/lib1526-warnless.$(OBJEXT)
+am_lib1526_OBJECTS = lib1526-lib1526.$(OBJEXT) $(am__objects_53) \
+ $(am__objects_54) $(am__objects_55)
lib1526_OBJECTS = $(am_lib1526_OBJECTS)
lib1526_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_55 = lib1527-first.$(OBJEXT)
-am__objects_56 = lib1527-testutil.$(OBJEXT)
-am__objects_57 = ../../lib/lib1527-warnless.$(OBJEXT)
-am_lib1527_OBJECTS = lib1527-lib1527.$(OBJEXT) $(am__objects_55) \
- $(am__objects_56) $(am__objects_57)
+am__objects_56 = lib1527-first.$(OBJEXT)
+am__objects_57 = lib1527-testutil.$(OBJEXT)
+am__objects_58 = ../../lib/lib1527-warnless.$(OBJEXT)
+am_lib1527_OBJECTS = lib1527-lib1527.$(OBJEXT) $(am__objects_56) \
+ $(am__objects_57) $(am__objects_58)
lib1527_OBJECTS = $(am_lib1527_OBJECTS)
lib1527_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_58 = lib1528-first.$(OBJEXT)
-am__objects_59 = lib1528-testutil.$(OBJEXT)
-am__objects_60 = ../../lib/lib1528-warnless.$(OBJEXT)
-am_lib1528_OBJECTS = lib1528-lib1528.$(OBJEXT) $(am__objects_58) \
- $(am__objects_59) $(am__objects_60)
+am__objects_59 = lib1528-first.$(OBJEXT)
+am__objects_60 = lib1528-testutil.$(OBJEXT)
+am__objects_61 = ../../lib/lib1528-warnless.$(OBJEXT)
+am_lib1528_OBJECTS = lib1528-lib1528.$(OBJEXT) $(am__objects_59) \
+ $(am__objects_60) $(am__objects_61)
lib1528_OBJECTS = $(am_lib1528_OBJECTS)
lib1528_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_61 = lib1529-first.$(OBJEXT)
-am__objects_62 = lib1529-testutil.$(OBJEXT)
-am__objects_63 = ../../lib/lib1529-warnless.$(OBJEXT)
-am_lib1529_OBJECTS = lib1529-lib1529.$(OBJEXT) $(am__objects_61) \
- $(am__objects_62) $(am__objects_63)
+am__objects_62 = lib1529-first.$(OBJEXT)
+am__objects_63 = lib1529-testutil.$(OBJEXT)
+am__objects_64 = ../../lib/lib1529-warnless.$(OBJEXT)
+am_lib1529_OBJECTS = lib1529-lib1529.$(OBJEXT) $(am__objects_62) \
+ $(am__objects_63) $(am__objects_64)
lib1529_OBJECTS = $(am_lib1529_OBJECTS)
lib1529_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_64 = lib1530-first.$(OBJEXT)
-am__objects_65 = lib1530-testutil.$(OBJEXT)
-am__objects_66 = ../../lib/lib1530-warnless.$(OBJEXT)
-am_lib1530_OBJECTS = lib1530-lib1530.$(OBJEXT) $(am__objects_64) \
- $(am__objects_65) $(am__objects_66)
+am__objects_65 = lib1530-first.$(OBJEXT)
+am__objects_66 = lib1530-testutil.$(OBJEXT)
+am__objects_67 = ../../lib/lib1530-warnless.$(OBJEXT)
+am_lib1530_OBJECTS = lib1530-lib1530.$(OBJEXT) $(am__objects_65) \
+ $(am__objects_66) $(am__objects_67)
lib1530_OBJECTS = $(am_lib1530_OBJECTS)
lib1530_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_67 = lib1531-first.$(OBJEXT)
-am__objects_68 = lib1531-testutil.$(OBJEXT)
-am__objects_69 = ../../lib/lib1531-warnless.$(OBJEXT)
-am_lib1531_OBJECTS = lib1531-lib1531.$(OBJEXT) $(am__objects_67) \
- $(am__objects_68) $(am__objects_69)
+am__objects_68 = lib1531-first.$(OBJEXT)
+am__objects_69 = lib1531-testutil.$(OBJEXT)
+am__objects_70 = ../../lib/lib1531-warnless.$(OBJEXT)
+am_lib1531_OBJECTS = lib1531-lib1531.$(OBJEXT) $(am__objects_68) \
+ $(am__objects_69) $(am__objects_70)
lib1531_OBJECTS = $(am_lib1531_OBJECTS)
lib1531_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_70 = lib1900-first.$(OBJEXT)
-am__objects_71 = lib1900-testutil.$(OBJEXT)
-am__objects_72 = ../../lib/lib1900-warnless.$(OBJEXT)
-am_lib1900_OBJECTS = lib1900-lib1900.$(OBJEXT) $(am__objects_70) \
- $(am__objects_71) $(am__objects_72)
+am__objects_71 = lib1900-first.$(OBJEXT)
+am__objects_72 = lib1900-testutil.$(OBJEXT)
+am__objects_73 = ../../lib/lib1900-warnless.$(OBJEXT)
+am_lib1900_OBJECTS = lib1900-lib1900.$(OBJEXT) $(am__objects_71) \
+ $(am__objects_72) $(am__objects_73)
lib1900_OBJECTS = $(am_lib1900_OBJECTS)
lib1900_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_73 = lib2033-first.$(OBJEXT)
-am__objects_74 = lib2033-testutil.$(OBJEXT)
-am__objects_75 = ../../lib/lib2033-warnless.$(OBJEXT)
+am__objects_74 = lib2033-first.$(OBJEXT)
+am__objects_75 = lib2033-testutil.$(OBJEXT)
+am__objects_76 = ../../lib/lib2033-warnless.$(OBJEXT)
am_lib2033_OBJECTS = lib2033-libntlmconnect.$(OBJEXT) \
- $(am__objects_73) $(am__objects_74) $(am__objects_75)
+ $(am__objects_74) $(am__objects_75) $(am__objects_76)
lib2033_OBJECTS = $(am_lib2033_OBJECTS)
lib2033_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_76 = lib500-first.$(OBJEXT)
-am__objects_77 = lib500-testutil.$(OBJEXT)
-am__objects_78 = lib500-testtrace.$(OBJEXT)
-am_lib500_OBJECTS = lib500-lib500.$(OBJEXT) $(am__objects_76) \
- $(am__objects_77) $(am__objects_78)
+am__objects_77 = lib500-first.$(OBJEXT)
+am__objects_78 = lib500-testutil.$(OBJEXT)
+am__objects_79 = lib500-testtrace.$(OBJEXT)
+am_lib500_OBJECTS = lib500-lib500.$(OBJEXT) $(am__objects_77) \
+ $(am__objects_78) $(am__objects_79)
lib500_OBJECTS = $(am_lib500_OBJECTS)
lib500_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_79 = lib501-first.$(OBJEXT)
-am_lib501_OBJECTS = lib501-lib501.$(OBJEXT) $(am__objects_79)
+am__objects_80 = lib501-first.$(OBJEXT)
+am_lib501_OBJECTS = lib501-lib501.$(OBJEXT) $(am__objects_80)
lib501_OBJECTS = $(am_lib501_OBJECTS)
lib501_LDADD = $(LDADD)
lib501_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_80 = lib502-first.$(OBJEXT)
-am__objects_81 = lib502-testutil.$(OBJEXT)
-am__objects_82 = ../../lib/lib502-warnless.$(OBJEXT)
-am_lib502_OBJECTS = lib502-lib502.$(OBJEXT) $(am__objects_80) \
- $(am__objects_81) $(am__objects_82)
+am__objects_81 = lib502-first.$(OBJEXT)
+am__objects_82 = lib502-testutil.$(OBJEXT)
+am__objects_83 = ../../lib/lib502-warnless.$(OBJEXT)
+am_lib502_OBJECTS = lib502-lib502.$(OBJEXT) $(am__objects_81) \
+ $(am__objects_82) $(am__objects_83)
lib502_OBJECTS = $(am_lib502_OBJECTS)
lib502_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_83 = lib503-first.$(OBJEXT)
-am__objects_84 = lib503-testutil.$(OBJEXT)
-am__objects_85 = ../../lib/lib503-warnless.$(OBJEXT)
-am_lib503_OBJECTS = lib503-lib503.$(OBJEXT) $(am__objects_83) \
- $(am__objects_84) $(am__objects_85)
+am__objects_84 = lib503-first.$(OBJEXT)
+am__objects_85 = lib503-testutil.$(OBJEXT)
+am__objects_86 = ../../lib/lib503-warnless.$(OBJEXT)
+am_lib503_OBJECTS = lib503-lib503.$(OBJEXT) $(am__objects_84) \
+ $(am__objects_85) $(am__objects_86)
lib503_OBJECTS = $(am_lib503_OBJECTS)
lib503_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_86 = lib504-first.$(OBJEXT)
-am__objects_87 = lib504-testutil.$(OBJEXT)
-am__objects_88 = ../../lib/lib504-warnless.$(OBJEXT)
-am_lib504_OBJECTS = lib504-lib504.$(OBJEXT) $(am__objects_86) \
- $(am__objects_87) $(am__objects_88)
+am__objects_87 = lib504-first.$(OBJEXT)
+am__objects_88 = lib504-testutil.$(OBJEXT)
+am__objects_89 = ../../lib/lib504-warnless.$(OBJEXT)
+am_lib504_OBJECTS = lib504-lib504.$(OBJEXT) $(am__objects_87) \
+ $(am__objects_88) $(am__objects_89)
lib504_OBJECTS = $(am_lib504_OBJECTS)
lib504_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_89 = lib505-first.$(OBJEXT)
-am_lib505_OBJECTS = lib505-lib505.$(OBJEXT) $(am__objects_89)
+am__objects_90 = lib505-first.$(OBJEXT)
+am_lib505_OBJECTS = lib505-lib505.$(OBJEXT) $(am__objects_90)
lib505_OBJECTS = $(am_lib505_OBJECTS)
lib505_LDADD = $(LDADD)
lib505_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_90 = lib506-first.$(OBJEXT)
-am_lib506_OBJECTS = lib506-lib506.$(OBJEXT) $(am__objects_90)
+am__objects_91 = lib506-first.$(OBJEXT)
+am_lib506_OBJECTS = lib506-lib506.$(OBJEXT) $(am__objects_91)
lib506_OBJECTS = $(am_lib506_OBJECTS)
lib506_LDADD = $(LDADD)
lib506_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_91 = lib507-first.$(OBJEXT)
-am__objects_92 = lib507-testutil.$(OBJEXT)
-am__objects_93 = ../../lib/lib507-warnless.$(OBJEXT)
-am_lib507_OBJECTS = lib507-lib507.$(OBJEXT) $(am__objects_91) \
- $(am__objects_92) $(am__objects_93)
+am__objects_92 = lib507-first.$(OBJEXT)
+am__objects_93 = lib507-testutil.$(OBJEXT)
+am__objects_94 = ../../lib/lib507-warnless.$(OBJEXT)
+am_lib507_OBJECTS = lib507-lib507.$(OBJEXT) $(am__objects_92) \
+ $(am__objects_93) $(am__objects_94)
lib507_OBJECTS = $(am_lib507_OBJECTS)
lib507_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_94 = lib508-first.$(OBJEXT)
-am_lib508_OBJECTS = lib508-lib508.$(OBJEXT) $(am__objects_94)
+am__objects_95 = lib508-first.$(OBJEXT)
+am_lib508_OBJECTS = lib508-lib508.$(OBJEXT) $(am__objects_95)
lib508_OBJECTS = $(am_lib508_OBJECTS)
lib508_LDADD = $(LDADD)
lib508_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_95 = lib509-first.$(OBJEXT)
-am_lib509_OBJECTS = lib509-lib509.$(OBJEXT) $(am__objects_95)
+am__objects_96 = lib509-first.$(OBJEXT)
+am_lib509_OBJECTS = lib509-lib509.$(OBJEXT) $(am__objects_96)
lib509_OBJECTS = $(am_lib509_OBJECTS)
lib509_LDADD = $(LDADD)
lib509_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_96 = lib510-first.$(OBJEXT)
-am_lib510_OBJECTS = lib510-lib510.$(OBJEXT) $(am__objects_96)
+am__objects_97 = lib510-first.$(OBJEXT)
+am_lib510_OBJECTS = lib510-lib510.$(OBJEXT) $(am__objects_97)
lib510_OBJECTS = $(am_lib510_OBJECTS)
lib510_LDADD = $(LDADD)
lib510_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_97 = lib511-first.$(OBJEXT)
-am_lib511_OBJECTS = lib511-lib511.$(OBJEXT) $(am__objects_97)
+am__objects_98 = lib511-first.$(OBJEXT)
+am_lib511_OBJECTS = lib511-lib511.$(OBJEXT) $(am__objects_98)
lib511_OBJECTS = $(am_lib511_OBJECTS)
lib511_LDADD = $(LDADD)
lib511_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_98 = lib512-first.$(OBJEXT)
-am_lib512_OBJECTS = lib512-lib512.$(OBJEXT) $(am__objects_98)
+am__objects_99 = lib512-first.$(OBJEXT)
+am_lib512_OBJECTS = lib512-lib512.$(OBJEXT) $(am__objects_99)
lib512_OBJECTS = $(am_lib512_OBJECTS)
lib512_LDADD = $(LDADD)
lib512_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_99 = lib513-first.$(OBJEXT)
-am_lib513_OBJECTS = lib513-lib513.$(OBJEXT) $(am__objects_99)
+am__objects_100 = lib513-first.$(OBJEXT)
+am_lib513_OBJECTS = lib513-lib513.$(OBJEXT) $(am__objects_100)
lib513_OBJECTS = $(am_lib513_OBJECTS)
lib513_LDADD = $(LDADD)
lib513_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_100 = lib514-first.$(OBJEXT)
-am_lib514_OBJECTS = lib514-lib514.$(OBJEXT) $(am__objects_100)
+am__objects_101 = lib514-first.$(OBJEXT)
+am_lib514_OBJECTS = lib514-lib514.$(OBJEXT) $(am__objects_101)
lib514_OBJECTS = $(am_lib514_OBJECTS)
lib514_LDADD = $(LDADD)
lib514_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_101 = lib515-first.$(OBJEXT)
-am_lib515_OBJECTS = lib515-lib515.$(OBJEXT) $(am__objects_101)
+am__objects_102 = lib515-first.$(OBJEXT)
+am_lib515_OBJECTS = lib515-lib515.$(OBJEXT) $(am__objects_102)
lib515_OBJECTS = $(am_lib515_OBJECTS)
lib515_LDADD = $(LDADD)
lib515_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_102 = lib516-first.$(OBJEXT)
-am_lib516_OBJECTS = lib516-lib516.$(OBJEXT) $(am__objects_102)
+am__objects_103 = lib516-first.$(OBJEXT)
+am_lib516_OBJECTS = lib516-lib516.$(OBJEXT) $(am__objects_103)
lib516_OBJECTS = $(am_lib516_OBJECTS)
lib516_LDADD = $(LDADD)
lib516_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_103 = lib517-first.$(OBJEXT)
-am_lib517_OBJECTS = lib517-lib517.$(OBJEXT) $(am__objects_103)
+am__objects_104 = lib517-first.$(OBJEXT)
+am_lib517_OBJECTS = lib517-lib517.$(OBJEXT) $(am__objects_104)
lib517_OBJECTS = $(am_lib517_OBJECTS)
lib517_LDADD = $(LDADD)
lib517_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_104 = lib518-first.$(OBJEXT)
-am__objects_105 = ../../lib/lib518-warnless.$(OBJEXT)
-am_lib518_OBJECTS = lib518-lib518.$(OBJEXT) $(am__objects_104) \
- $(am__objects_105)
+am__objects_105 = lib518-first.$(OBJEXT)
+am__objects_106 = ../../lib/lib518-warnless.$(OBJEXT)
+am_lib518_OBJECTS = lib518-lib518.$(OBJEXT) $(am__objects_105) \
+ $(am__objects_106)
lib518_OBJECTS = $(am_lib518_OBJECTS)
lib518_LDADD = $(LDADD)
lib518_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_106 = lib519-first.$(OBJEXT)
-am_lib519_OBJECTS = lib519-lib519.$(OBJEXT) $(am__objects_106)
+am__objects_107 = lib519-first.$(OBJEXT)
+am_lib519_OBJECTS = lib519-lib519.$(OBJEXT) $(am__objects_107)
lib519_OBJECTS = $(am_lib519_OBJECTS)
lib519_LDADD = $(LDADD)
lib519_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_107 = lib520-first.$(OBJEXT)
-am_lib520_OBJECTS = lib520-lib520.$(OBJEXT) $(am__objects_107)
+am__objects_108 = lib520-first.$(OBJEXT)
+am_lib520_OBJECTS = lib520-lib520.$(OBJEXT) $(am__objects_108)
lib520_OBJECTS = $(am_lib520_OBJECTS)
lib520_LDADD = $(LDADD)
lib520_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_108 = lib521-first.$(OBJEXT)
-am_lib521_OBJECTS = lib521-lib521.$(OBJEXT) $(am__objects_108)
+am__objects_109 = lib521-first.$(OBJEXT)
+am_lib521_OBJECTS = lib521-lib521.$(OBJEXT) $(am__objects_109)
lib521_OBJECTS = $(am_lib521_OBJECTS)
lib521_LDADD = $(LDADD)
lib521_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_109 = lib523-first.$(OBJEXT)
-am_lib523_OBJECTS = lib523-lib523.$(OBJEXT) $(am__objects_109)
+am__objects_110 = lib523-first.$(OBJEXT)
+am_lib523_OBJECTS = lib523-lib523.$(OBJEXT) $(am__objects_110)
lib523_OBJECTS = $(am_lib523_OBJECTS)
lib523_LDADD = $(LDADD)
lib523_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_110 = lib524-first.$(OBJEXT)
-am_lib524_OBJECTS = lib524-lib524.$(OBJEXT) $(am__objects_110)
+am__objects_111 = lib524-first.$(OBJEXT)
+am_lib524_OBJECTS = lib524-lib524.$(OBJEXT) $(am__objects_111)
lib524_OBJECTS = $(am_lib524_OBJECTS)
lib524_LDADD = $(LDADD)
lib524_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_111 = lib525-first.$(OBJEXT)
-am__objects_112 = lib525-testutil.$(OBJEXT)
-am__objects_113 = ../../lib/lib525-warnless.$(OBJEXT)
-am_lib525_OBJECTS = lib525-lib525.$(OBJEXT) $(am__objects_111) \
- $(am__objects_112) $(am__objects_113)
+am__objects_112 = lib525-first.$(OBJEXT)
+am__objects_113 = lib525-testutil.$(OBJEXT)
+am__objects_114 = ../../lib/lib525-warnless.$(OBJEXT)
+am_lib525_OBJECTS = lib525-lib525.$(OBJEXT) $(am__objects_112) \
+ $(am__objects_113) $(am__objects_114)
lib525_OBJECTS = $(am_lib525_OBJECTS)
lib525_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_114 = lib526-first.$(OBJEXT)
-am__objects_115 = lib526-testutil.$(OBJEXT)
-am__objects_116 = ../../lib/lib526-warnless.$(OBJEXT)
-am_lib526_OBJECTS = lib526-lib526.$(OBJEXT) $(am__objects_114) \
- $(am__objects_115) $(am__objects_116)
+am__objects_115 = lib526-first.$(OBJEXT)
+am__objects_116 = lib526-testutil.$(OBJEXT)
+am__objects_117 = ../../lib/lib526-warnless.$(OBJEXT)
+am_lib526_OBJECTS = lib526-lib526.$(OBJEXT) $(am__objects_115) \
+ $(am__objects_116) $(am__objects_117)
lib526_OBJECTS = $(am_lib526_OBJECTS)
lib526_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_117 = lib527-first.$(OBJEXT)
-am__objects_118 = lib527-testutil.$(OBJEXT)
-am__objects_119 = ../../lib/lib527-warnless.$(OBJEXT)
-am_lib527_OBJECTS = lib527-lib526.$(OBJEXT) $(am__objects_117) \
- $(am__objects_118) $(am__objects_119)
+am__objects_118 = lib527-first.$(OBJEXT)
+am__objects_119 = lib527-testutil.$(OBJEXT)
+am__objects_120 = ../../lib/lib527-warnless.$(OBJEXT)
+am_lib527_OBJECTS = lib527-lib526.$(OBJEXT) $(am__objects_118) \
+ $(am__objects_119) $(am__objects_120)
lib527_OBJECTS = $(am_lib527_OBJECTS)
lib527_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_120 = lib529-first.$(OBJEXT)
-am__objects_121 = lib529-testutil.$(OBJEXT)
-am__objects_122 = ../../lib/lib529-warnless.$(OBJEXT)
-am_lib529_OBJECTS = lib529-lib525.$(OBJEXT) $(am__objects_120) \
- $(am__objects_121) $(am__objects_122)
+am__objects_121 = lib529-first.$(OBJEXT)
+am__objects_122 = lib529-testutil.$(OBJEXT)
+am__objects_123 = ../../lib/lib529-warnless.$(OBJEXT)
+am_lib529_OBJECTS = lib529-lib525.$(OBJEXT) $(am__objects_121) \
+ $(am__objects_122) $(am__objects_123)
lib529_OBJECTS = $(am_lib529_OBJECTS)
lib529_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_123 = lib530-first.$(OBJEXT)
-am__objects_124 = lib530-testutil.$(OBJEXT)
-am__objects_125 = ../../lib/lib530-warnless.$(OBJEXT)
-am_lib530_OBJECTS = lib530-lib530.$(OBJEXT) $(am__objects_123) \
- $(am__objects_124) $(am__objects_125)
+am__objects_124 = lib530-first.$(OBJEXT)
+am__objects_125 = lib530-testutil.$(OBJEXT)
+am__objects_126 = ../../lib/lib530-warnless.$(OBJEXT)
+am_lib530_OBJECTS = lib530-lib530.$(OBJEXT) $(am__objects_124) \
+ $(am__objects_125) $(am__objects_126)
lib530_OBJECTS = $(am_lib530_OBJECTS)
lib530_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_126 = lib532-first.$(OBJEXT)
-am__objects_127 = lib532-testutil.$(OBJEXT)
-am__objects_128 = ../../lib/lib532-warnless.$(OBJEXT)
-am_lib532_OBJECTS = lib532-lib526.$(OBJEXT) $(am__objects_126) \
- $(am__objects_127) $(am__objects_128)
+am__objects_127 = lib532-first.$(OBJEXT)
+am__objects_128 = lib532-testutil.$(OBJEXT)
+am__objects_129 = ../../lib/lib532-warnless.$(OBJEXT)
+am_lib532_OBJECTS = lib532-lib526.$(OBJEXT) $(am__objects_127) \
+ $(am__objects_128) $(am__objects_129)
lib532_OBJECTS = $(am_lib532_OBJECTS)
lib532_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_129 = lib533-first.$(OBJEXT)
-am__objects_130 = lib533-testutil.$(OBJEXT)
-am__objects_131 = ../../lib/lib533-warnless.$(OBJEXT)
-am_lib533_OBJECTS = lib533-lib533.$(OBJEXT) $(am__objects_129) \
- $(am__objects_130) $(am__objects_131)
+am__objects_130 = lib533-first.$(OBJEXT)
+am__objects_131 = lib533-testutil.$(OBJEXT)
+am__objects_132 = ../../lib/lib533-warnless.$(OBJEXT)
+am_lib533_OBJECTS = lib533-lib533.$(OBJEXT) $(am__objects_130) \
+ $(am__objects_131) $(am__objects_132)
lib533_OBJECTS = $(am_lib533_OBJECTS)
lib533_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_132 = lib536-first.$(OBJEXT)
-am__objects_133 = lib536-testutil.$(OBJEXT)
-am__objects_134 = ../../lib/lib536-warnless.$(OBJEXT)
-am_lib536_OBJECTS = lib536-lib536.$(OBJEXT) $(am__objects_132) \
- $(am__objects_133) $(am__objects_134)
+am__objects_133 = lib536-first.$(OBJEXT)
+am__objects_134 = lib536-testutil.$(OBJEXT)
+am__objects_135 = ../../lib/lib536-warnless.$(OBJEXT)
+am_lib536_OBJECTS = lib536-lib536.$(OBJEXT) $(am__objects_133) \
+ $(am__objects_134) $(am__objects_135)
lib536_OBJECTS = $(am_lib536_OBJECTS)
lib536_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_135 = lib537-first.$(OBJEXT)
-am__objects_136 = ../../lib/lib537-warnless.$(OBJEXT)
-am_lib537_OBJECTS = lib537-lib537.$(OBJEXT) $(am__objects_135) \
- $(am__objects_136)
+am__objects_136 = lib537-first.$(OBJEXT)
+am__objects_137 = ../../lib/lib537-warnless.$(OBJEXT)
+am_lib537_OBJECTS = lib537-lib537.$(OBJEXT) $(am__objects_136) \
+ $(am__objects_137)
lib537_OBJECTS = $(am_lib537_OBJECTS)
lib537_LDADD = $(LDADD)
lib537_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_137 = lib539-first.$(OBJEXT)
-am_lib539_OBJECTS = lib539-lib539.$(OBJEXT) $(am__objects_137)
+am__objects_138 = lib539-first.$(OBJEXT)
+am_lib539_OBJECTS = lib539-lib539.$(OBJEXT) $(am__objects_138)
lib539_OBJECTS = $(am_lib539_OBJECTS)
lib539_LDADD = $(LDADD)
lib539_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_138 = lib540-first.$(OBJEXT)
-am__objects_139 = lib540-testutil.$(OBJEXT)
-am__objects_140 = ../../lib/lib540-warnless.$(OBJEXT)
-am_lib540_OBJECTS = lib540-lib540.$(OBJEXT) $(am__objects_138) \
- $(am__objects_139) $(am__objects_140)
+am__objects_139 = lib540-first.$(OBJEXT)
+am__objects_140 = lib540-testutil.$(OBJEXT)
+am__objects_141 = ../../lib/lib540-warnless.$(OBJEXT)
+am_lib540_OBJECTS = lib540-lib540.$(OBJEXT) $(am__objects_139) \
+ $(am__objects_140) $(am__objects_141)
lib540_OBJECTS = $(am_lib540_OBJECTS)
lib540_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_141 = lib541-first.$(OBJEXT)
-am_lib541_OBJECTS = lib541-lib541.$(OBJEXT) $(am__objects_141)
+am__objects_142 = lib541-first.$(OBJEXT)
+am_lib541_OBJECTS = lib541-lib541.$(OBJEXT) $(am__objects_142)
lib541_OBJECTS = $(am_lib541_OBJECTS)
lib541_LDADD = $(LDADD)
lib541_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_142 = lib542-first.$(OBJEXT)
-am_lib542_OBJECTS = lib542-lib542.$(OBJEXT) $(am__objects_142)
+am__objects_143 = lib542-first.$(OBJEXT)
+am_lib542_OBJECTS = lib542-lib542.$(OBJEXT) $(am__objects_143)
lib542_OBJECTS = $(am_lib542_OBJECTS)
lib542_LDADD = $(LDADD)
lib542_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_143 = lib543-first.$(OBJEXT)
-am_lib543_OBJECTS = lib543-lib543.$(OBJEXT) $(am__objects_143)
+am__objects_144 = lib543-first.$(OBJEXT)
+am_lib543_OBJECTS = lib543-lib543.$(OBJEXT) $(am__objects_144)
lib543_OBJECTS = $(am_lib543_OBJECTS)
lib543_LDADD = $(LDADD)
lib543_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_144 = lib544-first.$(OBJEXT)
-am_lib544_OBJECTS = lib544-lib544.$(OBJEXT) $(am__objects_144)
+am__objects_145 = lib544-first.$(OBJEXT)
+am_lib544_OBJECTS = lib544-lib544.$(OBJEXT) $(am__objects_145)
lib544_OBJECTS = $(am_lib544_OBJECTS)
lib544_LDADD = $(LDADD)
lib544_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_145 = lib545-first.$(OBJEXT)
-am_lib545_OBJECTS = lib545-lib544.$(OBJEXT) $(am__objects_145)
+am__objects_146 = lib545-first.$(OBJEXT)
+am_lib545_OBJECTS = lib545-lib544.$(OBJEXT) $(am__objects_146)
lib545_OBJECTS = $(am_lib545_OBJECTS)
lib545_LDADD = $(LDADD)
lib545_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_146 = lib547-first.$(OBJEXT)
-am_lib547_OBJECTS = lib547-lib547.$(OBJEXT) $(am__objects_146)
+am__objects_147 = lib547-first.$(OBJEXT)
+am_lib547_OBJECTS = lib547-lib547.$(OBJEXT) $(am__objects_147)
lib547_OBJECTS = $(am_lib547_OBJECTS)
lib547_LDADD = $(LDADD)
lib547_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_147 = lib548-first.$(OBJEXT)
-am_lib548_OBJECTS = lib548-lib547.$(OBJEXT) $(am__objects_147)
+am__objects_148 = lib548-first.$(OBJEXT)
+am_lib548_OBJECTS = lib548-lib547.$(OBJEXT) $(am__objects_148)
lib548_OBJECTS = $(am_lib548_OBJECTS)
lib548_LDADD = $(LDADD)
lib548_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_148 = lib549-first.$(OBJEXT)
-am_lib549_OBJECTS = lib549-lib549.$(OBJEXT) $(am__objects_148)
+am__objects_149 = lib549-first.$(OBJEXT)
+am_lib549_OBJECTS = lib549-lib549.$(OBJEXT) $(am__objects_149)
lib549_OBJECTS = $(am_lib549_OBJECTS)
lib549_LDADD = $(LDADD)
lib549_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_149 = lib552-first.$(OBJEXT)
-am__objects_150 = ../../lib/lib552-warnless.$(OBJEXT)
-am_lib552_OBJECTS = lib552-lib552.$(OBJEXT) $(am__objects_149) \
- $(am__objects_150)
+am__objects_150 = lib552-first.$(OBJEXT)
+am__objects_151 = ../../lib/lib552-warnless.$(OBJEXT)
+am_lib552_OBJECTS = lib552-lib552.$(OBJEXT) $(am__objects_150) \
+ $(am__objects_151)
lib552_OBJECTS = $(am_lib552_OBJECTS)
lib552_LDADD = $(LDADD)
lib552_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_151 = lib553-first.$(OBJEXT)
-am_lib553_OBJECTS = lib553-lib553.$(OBJEXT) $(am__objects_151)
+am__objects_152 = lib553-first.$(OBJEXT)
+am_lib553_OBJECTS = lib553-lib553.$(OBJEXT) $(am__objects_152)
lib553_OBJECTS = $(am_lib553_OBJECTS)
lib553_LDADD = $(LDADD)
lib553_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_152 = lib554-first.$(OBJEXT)
-am_lib554_OBJECTS = lib554-lib554.$(OBJEXT) $(am__objects_152)
+am__objects_153 = lib554-first.$(OBJEXT)
+am_lib554_OBJECTS = lib554-lib554.$(OBJEXT) $(am__objects_153)
lib554_OBJECTS = $(am_lib554_OBJECTS)
lib554_LDADD = $(LDADD)
lib554_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_153 = lib555-first.$(OBJEXT)
-am__objects_154 = lib555-testutil.$(OBJEXT)
-am__objects_155 = ../../lib/lib555-warnless.$(OBJEXT)
-am_lib555_OBJECTS = lib555-lib555.$(OBJEXT) $(am__objects_153) \
- $(am__objects_154) $(am__objects_155)
+am__objects_154 = lib555-first.$(OBJEXT)
+am__objects_155 = lib555-testutil.$(OBJEXT)
+am__objects_156 = ../../lib/lib555-warnless.$(OBJEXT)
+am_lib555_OBJECTS = lib555-lib555.$(OBJEXT) $(am__objects_154) \
+ $(am__objects_155) $(am__objects_156)
lib555_OBJECTS = $(am_lib555_OBJECTS)
lib555_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_156 = lib556-first.$(OBJEXT)
-am__objects_157 = ../../lib/lib556-warnless.$(OBJEXT)
-am_lib556_OBJECTS = lib556-lib556.$(OBJEXT) $(am__objects_156) \
- $(am__objects_157)
+am__objects_157 = lib556-first.$(OBJEXT)
+am__objects_158 = ../../lib/lib556-warnless.$(OBJEXT)
+am_lib556_OBJECTS = lib556-lib556.$(OBJEXT) $(am__objects_157) \
+ $(am__objects_158)
lib556_OBJECTS = $(am_lib556_OBJECTS)
lib556_LDADD = $(LDADD)
lib556_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_158 = lib557-first.$(OBJEXT)
-am_lib557_OBJECTS = lib557-lib557.$(OBJEXT) $(am__objects_158)
+am__objects_159 = lib557-first.$(OBJEXT)
+am_lib557_OBJECTS = lib557-lib557.$(OBJEXT) $(am__objects_159)
lib557_OBJECTS = $(am_lib557_OBJECTS)
lib557_LDADD = $(LDADD)
lib557_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_159 = lib558-first.$(OBJEXT)
-am_lib558_OBJECTS = lib558-lib558.$(OBJEXT) $(am__objects_159)
+am__objects_160 = lib558-first.$(OBJEXT)
+am_lib558_OBJECTS = lib558-lib558.$(OBJEXT) $(am__objects_160)
lib558_OBJECTS = $(am_lib558_OBJECTS)
lib558_LDADD = $(LDADD)
lib558_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_160 = lib560-first.$(OBJEXT)
-am__objects_161 = lib560-testutil.$(OBJEXT)
-am__objects_162 = ../../lib/lib560-warnless.$(OBJEXT)
-am_lib560_OBJECTS = lib560-lib560.$(OBJEXT) $(am__objects_160) \
- $(am__objects_161) $(am__objects_162)
+am__objects_161 = lib560-first.$(OBJEXT)
+am__objects_162 = lib560-testutil.$(OBJEXT)
+am__objects_163 = ../../lib/lib560-warnless.$(OBJEXT)
+am_lib560_OBJECTS = lib560-lib560.$(OBJEXT) $(am__objects_161) \
+ $(am__objects_162) $(am__objects_163)
lib560_OBJECTS = $(am_lib560_OBJECTS)
lib560_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_163 = lib562-first.$(OBJEXT)
-am_lib562_OBJECTS = lib562-lib562.$(OBJEXT) $(am__objects_163)
+am__objects_164 = lib562-first.$(OBJEXT)
+am_lib562_OBJECTS = lib562-lib562.$(OBJEXT) $(am__objects_164)
lib562_OBJECTS = $(am_lib562_OBJECTS)
lib562_LDADD = $(LDADD)
lib562_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_164 = lib564-first.$(OBJEXT)
-am__objects_165 = lib564-testutil.$(OBJEXT)
-am__objects_166 = ../../lib/lib564-warnless.$(OBJEXT)
-am_lib564_OBJECTS = lib564-lib564.$(OBJEXT) $(am__objects_164) \
- $(am__objects_165) $(am__objects_166)
+am__objects_165 = lib564-first.$(OBJEXT)
+am__objects_166 = lib564-testutil.$(OBJEXT)
+am__objects_167 = ../../lib/lib564-warnless.$(OBJEXT)
+am_lib564_OBJECTS = lib564-lib564.$(OBJEXT) $(am__objects_165) \
+ $(am__objects_166) $(am__objects_167)
lib564_OBJECTS = $(am_lib564_OBJECTS)
lib564_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_167 = lib565-first.$(OBJEXT)
-am_lib565_OBJECTS = lib565-lib510.$(OBJEXT) $(am__objects_167)
+am__objects_168 = lib565-first.$(OBJEXT)
+am_lib565_OBJECTS = lib565-lib510.$(OBJEXT) $(am__objects_168)
lib565_OBJECTS = $(am_lib565_OBJECTS)
lib565_LDADD = $(LDADD)
lib565_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_168 = lib566-first.$(OBJEXT)
-am_lib566_OBJECTS = lib566-lib566.$(OBJEXT) $(am__objects_168)
+am__objects_169 = lib566-first.$(OBJEXT)
+am_lib566_OBJECTS = lib566-lib566.$(OBJEXT) $(am__objects_169)
lib566_OBJECTS = $(am_lib566_OBJECTS)
lib566_LDADD = $(LDADD)
lib566_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_169 = lib567-first.$(OBJEXT)
-am_lib567_OBJECTS = lib567-lib567.$(OBJEXT) $(am__objects_169)
+am__objects_170 = lib567-first.$(OBJEXT)
+am_lib567_OBJECTS = lib567-lib567.$(OBJEXT) $(am__objects_170)
lib567_OBJECTS = $(am_lib567_OBJECTS)
lib567_LDADD = $(LDADD)
lib567_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_170 = lib568-first.$(OBJEXT)
-am_lib568_OBJECTS = lib568-lib568.$(OBJEXT) $(am__objects_170)
+am__objects_171 = lib568-first.$(OBJEXT)
+am_lib568_OBJECTS = lib568-lib568.$(OBJEXT) $(am__objects_171)
lib568_OBJECTS = $(am_lib568_OBJECTS)
lib568_LDADD = $(LDADD)
lib568_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_171 = lib569-first.$(OBJEXT)
-am_lib569_OBJECTS = lib569-lib569.$(OBJEXT) $(am__objects_171)
+am__objects_172 = lib569-first.$(OBJEXT)
+am_lib569_OBJECTS = lib569-lib569.$(OBJEXT) $(am__objects_172)
lib569_OBJECTS = $(am_lib569_OBJECTS)
lib569_LDADD = $(LDADD)
lib569_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_172 = lib570-first.$(OBJEXT)
-am_lib570_OBJECTS = lib570-lib570.$(OBJEXT) $(am__objects_172)
+am__objects_173 = lib570-first.$(OBJEXT)
+am_lib570_OBJECTS = lib570-lib570.$(OBJEXT) $(am__objects_173)
lib570_OBJECTS = $(am_lib570_OBJECTS)
lib570_LDADD = $(LDADD)
lib570_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_173 = lib571-first.$(OBJEXT)
-am__objects_174 = ../../lib/lib571-warnless.$(OBJEXT)
-am_lib571_OBJECTS = lib571-lib571.$(OBJEXT) $(am__objects_173) \
- $(am__objects_174)
+am__objects_174 = lib571-first.$(OBJEXT)
+am__objects_175 = ../../lib/lib571-warnless.$(OBJEXT)
+am_lib571_OBJECTS = lib571-lib571.$(OBJEXT) $(am__objects_174) \
+ $(am__objects_175)
lib571_OBJECTS = $(am_lib571_OBJECTS)
lib571_LDADD = $(LDADD)
lib571_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_175 = lib572-first.$(OBJEXT)
-am_lib572_OBJECTS = lib572-lib572.$(OBJEXT) $(am__objects_175)
+am__objects_176 = lib572-first.$(OBJEXT)
+am_lib572_OBJECTS = lib572-lib572.$(OBJEXT) $(am__objects_176)
lib572_OBJECTS = $(am_lib572_OBJECTS)
lib572_LDADD = $(LDADD)
lib572_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_176 = lib573-first.$(OBJEXT)
-am__objects_177 = lib573-testutil.$(OBJEXT)
-am__objects_178 = ../../lib/lib573-warnless.$(OBJEXT)
-am__objects_179 = lib573-testtrace.$(OBJEXT)
-am_lib573_OBJECTS = lib573-lib573.$(OBJEXT) $(am__objects_176) \
- $(am__objects_177) $(am__objects_178) $(am__objects_179)
+am__objects_177 = lib573-first.$(OBJEXT)
+am__objects_178 = lib573-testutil.$(OBJEXT)
+am__objects_179 = ../../lib/lib573-warnless.$(OBJEXT)
+am__objects_180 = lib573-testtrace.$(OBJEXT)
+am_lib573_OBJECTS = lib573-lib573.$(OBJEXT) $(am__objects_177) \
+ $(am__objects_178) $(am__objects_179) $(am__objects_180)
lib573_OBJECTS = $(am_lib573_OBJECTS)
lib573_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_180 = lib574-first.$(OBJEXT)
-am_lib574_OBJECTS = lib574-lib574.$(OBJEXT) $(am__objects_180)
+am__objects_181 = lib574-first.$(OBJEXT)
+am_lib574_OBJECTS = lib574-lib574.$(OBJEXT) $(am__objects_181)
lib574_OBJECTS = $(am_lib574_OBJECTS)
lib574_LDADD = $(LDADD)
lib574_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_181 = lib575-first.$(OBJEXT)
-am__objects_182 = lib575-testutil.$(OBJEXT)
-am__objects_183 = ../../lib/lib575-warnless.$(OBJEXT)
-am_lib575_OBJECTS = lib575-lib575.$(OBJEXT) $(am__objects_181) \
- $(am__objects_182) $(am__objects_183)
+am__objects_182 = lib575-first.$(OBJEXT)
+am__objects_183 = lib575-testutil.$(OBJEXT)
+am__objects_184 = ../../lib/lib575-warnless.$(OBJEXT)
+am_lib575_OBJECTS = lib575-lib575.$(OBJEXT) $(am__objects_182) \
+ $(am__objects_183) $(am__objects_184)
lib575_OBJECTS = $(am_lib575_OBJECTS)
lib575_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_184 = lib576-first.$(OBJEXT)
-am_lib576_OBJECTS = lib576-lib576.$(OBJEXT) $(am__objects_184)
+am__objects_185 = lib576-first.$(OBJEXT)
+am_lib576_OBJECTS = lib576-lib576.$(OBJEXT) $(am__objects_185)
lib576_OBJECTS = $(am_lib576_OBJECTS)
lib576_LDADD = $(LDADD)
lib576_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_185 = lib578-first.$(OBJEXT)
-am_lib578_OBJECTS = lib578-lib578.$(OBJEXT) $(am__objects_185)
+am__objects_186 = lib578-first.$(OBJEXT)
+am_lib578_OBJECTS = lib578-lib578.$(OBJEXT) $(am__objects_186)
lib578_OBJECTS = $(am_lib578_OBJECTS)
lib578_LDADD = $(LDADD)
lib578_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_186 = lib579-first.$(OBJEXT)
-am_lib579_OBJECTS = lib579-lib579.$(OBJEXT) $(am__objects_186)
+am__objects_187 = lib579-first.$(OBJEXT)
+am_lib579_OBJECTS = lib579-lib579.$(OBJEXT) $(am__objects_187)
lib579_OBJECTS = $(am_lib579_OBJECTS)
lib579_LDADD = $(LDADD)
lib579_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_187 = lib582-first.$(OBJEXT)
-am__objects_188 = lib582-testutil.$(OBJEXT)
-am__objects_189 = ../../lib/lib582-warnless.$(OBJEXT)
-am_lib582_OBJECTS = lib582-lib582.$(OBJEXT) $(am__objects_187) \
- $(am__objects_188) $(am__objects_189)
+am__objects_188 = lib582-first.$(OBJEXT)
+am__objects_189 = lib582-testutil.$(OBJEXT)
+am__objects_190 = ../../lib/lib582-warnless.$(OBJEXT)
+am_lib582_OBJECTS = lib582-lib582.$(OBJEXT) $(am__objects_188) \
+ $(am__objects_189) $(am__objects_190)
lib582_OBJECTS = $(am_lib582_OBJECTS)
lib582_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_190 = lib583-first.$(OBJEXT)
-am_lib583_OBJECTS = lib583-lib583.$(OBJEXT) $(am__objects_190)
+am__objects_191 = lib583-first.$(OBJEXT)
+am_lib583_OBJECTS = lib583-lib583.$(OBJEXT) $(am__objects_191)
lib583_OBJECTS = $(am_lib583_OBJECTS)
lib583_LDADD = $(LDADD)
lib583_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_191 = lib585-first.$(OBJEXT)
-am__objects_192 = lib585-testutil.$(OBJEXT)
-am__objects_193 = lib585-testtrace.$(OBJEXT)
-am_lib585_OBJECTS = lib585-lib500.$(OBJEXT) $(am__objects_191) \
- $(am__objects_192) $(am__objects_193)
+am__objects_192 = lib585-first.$(OBJEXT)
+am__objects_193 = lib585-testutil.$(OBJEXT)
+am__objects_194 = lib585-testtrace.$(OBJEXT)
+am_lib585_OBJECTS = lib585-lib500.$(OBJEXT) $(am__objects_192) \
+ $(am__objects_193) $(am__objects_194)
lib585_OBJECTS = $(am_lib585_OBJECTS)
lib585_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_194 = lib586-first.$(OBJEXT)
-am_lib586_OBJECTS = lib586-lib586.$(OBJEXT) $(am__objects_194)
+am__objects_195 = lib586-first.$(OBJEXT)
+am_lib586_OBJECTS = lib586-lib586.$(OBJEXT) $(am__objects_195)
lib586_OBJECTS = $(am_lib586_OBJECTS)
lib586_LDADD = $(LDADD)
lib586_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_195 = lib587-first.$(OBJEXT)
-am_lib587_OBJECTS = lib587-lib554.$(OBJEXT) $(am__objects_195)
+am__objects_196 = lib587-first.$(OBJEXT)
+am_lib587_OBJECTS = lib587-lib554.$(OBJEXT) $(am__objects_196)
lib587_OBJECTS = $(am_lib587_OBJECTS)
lib587_LDADD = $(LDADD)
lib587_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_196 = lib590-first.$(OBJEXT)
-am_lib590_OBJECTS = lib590-lib590.$(OBJEXT) $(am__objects_196)
+am__objects_197 = lib590-first.$(OBJEXT)
+am_lib590_OBJECTS = lib590-lib590.$(OBJEXT) $(am__objects_197)
lib590_OBJECTS = $(am_lib590_OBJECTS)
lib590_LDADD = $(LDADD)
lib590_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_197 = lib591-first.$(OBJEXT)
-am__objects_198 = lib591-testutil.$(OBJEXT)
-am__objects_199 = ../../lib/lib591-warnless.$(OBJEXT)
-am_lib591_OBJECTS = lib591-lib591.$(OBJEXT) $(am__objects_197) \
- $(am__objects_198) $(am__objects_199)
+am__objects_198 = lib591-first.$(OBJEXT)
+am__objects_199 = lib591-testutil.$(OBJEXT)
+am__objects_200 = ../../lib/lib591-warnless.$(OBJEXT)
+am_lib591_OBJECTS = lib591-lib591.$(OBJEXT) $(am__objects_198) \
+ $(am__objects_199) $(am__objects_200)
lib591_OBJECTS = $(am_lib591_OBJECTS)
lib591_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_200 = lib597-first.$(OBJEXT)
-am__objects_201 = lib597-testutil.$(OBJEXT)
-am__objects_202 = ../../lib/lib597-warnless.$(OBJEXT)
-am_lib597_OBJECTS = lib597-lib597.$(OBJEXT) $(am__objects_200) \
- $(am__objects_201) $(am__objects_202)
+am__objects_201 = lib597-first.$(OBJEXT)
+am__objects_202 = lib597-testutil.$(OBJEXT)
+am__objects_203 = ../../lib/lib597-warnless.$(OBJEXT)
+am_lib597_OBJECTS = lib597-lib597.$(OBJEXT) $(am__objects_201) \
+ $(am__objects_202) $(am__objects_203)
lib597_OBJECTS = $(am_lib597_OBJECTS)
lib597_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_203 = lib598-first.$(OBJEXT)
-am_lib598_OBJECTS = lib598-lib598.$(OBJEXT) $(am__objects_203)
+am__objects_204 = lib598-first.$(OBJEXT)
+am_lib598_OBJECTS = lib598-lib598.$(OBJEXT) $(am__objects_204)
lib598_OBJECTS = $(am_lib598_OBJECTS)
lib598_LDADD = $(LDADD)
lib598_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_204 = lib599-first.$(OBJEXT)
-am_lib599_OBJECTS = lib599-lib599.$(OBJEXT) $(am__objects_204)
+am__objects_205 = lib599-first.$(OBJEXT)
+am_lib599_OBJECTS = lib599-lib599.$(OBJEXT) $(am__objects_205)
lib599_OBJECTS = $(am_lib599_OBJECTS)
lib599_LDADD = $(LDADD)
lib599_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_205 = libauthretry-first.$(OBJEXT)
+am__objects_206 = libauthretry-first.$(OBJEXT)
am_libauthretry_OBJECTS = libauthretry-libauthretry.$(OBJEXT) \
- $(am__objects_205)
+ $(am__objects_206)
libauthretry_OBJECTS = $(am_libauthretry_OBJECTS)
libauthretry_LDADD = $(LDADD)
libauthretry_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_206 = libntlmconnect-first.$(OBJEXT)
-am__objects_207 = libntlmconnect-testutil.$(OBJEXT)
-am__objects_208 = ../../lib/libntlmconnect-warnless.$(OBJEXT)
+am__objects_207 = libntlmconnect-first.$(OBJEXT)
+am__objects_208 = libntlmconnect-testutil.$(OBJEXT)
+am__objects_209 = ../../lib/libntlmconnect-warnless.$(OBJEXT)
am_libntlmconnect_OBJECTS = libntlmconnect-libntlmconnect.$(OBJEXT) \
- $(am__objects_206) $(am__objects_207) $(am__objects_208)
+ $(am__objects_207) $(am__objects_208) $(am__objects_209)
libntlmconnect_OBJECTS = $(am_libntlmconnect_OBJECTS)
libntlmconnect_DEPENDENCIES = $(am__DEPENDENCIES_1)
AM_V_P = $(am__v_P_@AM_V@)
@@ -852,36 +857,36 @@ SOURCES = $(libhostname_la_SOURCES) $(chkhostname_SOURCES) \
$(lib1506_SOURCES) $(lib1507_SOURCES) $(lib1508_SOURCES) \
$(lib1509_SOURCES) $(lib1510_SOURCES) $(lib1511_SOURCES) \
$(lib1512_SOURCES) $(lib1513_SOURCES) $(lib1514_SOURCES) \
- $(lib1515_SOURCES) $(lib1520_SOURCES) $(lib1525_SOURCES) \
- $(lib1526_SOURCES) $(lib1527_SOURCES) $(lib1528_SOURCES) \
- $(lib1529_SOURCES) $(lib1530_SOURCES) $(lib1531_SOURCES) \
- $(lib1900_SOURCES) $(lib2033_SOURCES) $(lib500_SOURCES) \
- $(lib501_SOURCES) $(lib502_SOURCES) $(lib503_SOURCES) \
- $(lib504_SOURCES) $(lib505_SOURCES) $(lib506_SOURCES) \
- $(lib507_SOURCES) $(lib508_SOURCES) $(lib509_SOURCES) \
- $(lib510_SOURCES) $(lib511_SOURCES) $(lib512_SOURCES) \
- $(lib513_SOURCES) $(lib514_SOURCES) $(lib515_SOURCES) \
- $(lib516_SOURCES) $(lib517_SOURCES) $(lib518_SOURCES) \
- $(lib519_SOURCES) $(lib520_SOURCES) $(lib521_SOURCES) \
- $(lib523_SOURCES) $(lib524_SOURCES) $(lib525_SOURCES) \
- $(lib526_SOURCES) $(lib527_SOURCES) $(lib529_SOURCES) \
- $(lib530_SOURCES) $(lib532_SOURCES) $(lib533_SOURCES) \
- $(lib536_SOURCES) $(lib537_SOURCES) $(lib539_SOURCES) \
- $(lib540_SOURCES) $(lib541_SOURCES) $(lib542_SOURCES) \
- $(lib543_SOURCES) $(lib544_SOURCES) $(lib545_SOURCES) \
- $(lib547_SOURCES) $(lib548_SOURCES) $(lib549_SOURCES) \
- $(lib552_SOURCES) $(lib553_SOURCES) $(lib554_SOURCES) \
- $(lib555_SOURCES) $(lib556_SOURCES) $(lib557_SOURCES) \
- $(lib558_SOURCES) $(lib560_SOURCES) $(lib562_SOURCES) \
- $(lib564_SOURCES) $(lib565_SOURCES) $(lib566_SOURCES) \
- $(lib567_SOURCES) $(lib568_SOURCES) $(lib569_SOURCES) \
- $(lib570_SOURCES) $(lib571_SOURCES) $(lib572_SOURCES) \
- $(lib573_SOURCES) $(lib574_SOURCES) $(lib575_SOURCES) \
- $(lib576_SOURCES) $(lib578_SOURCES) $(lib579_SOURCES) \
- $(lib582_SOURCES) $(lib583_SOURCES) $(lib585_SOURCES) \
- $(lib586_SOURCES) $(lib587_SOURCES) $(lib590_SOURCES) \
- $(lib591_SOURCES) $(lib597_SOURCES) $(lib598_SOURCES) \
- $(lib599_SOURCES) $(libauthretry_SOURCES) \
+ $(lib1515_SOURCES) $(lib1517_SOURCES) $(lib1520_SOURCES) \
+ $(lib1525_SOURCES) $(lib1526_SOURCES) $(lib1527_SOURCES) \
+ $(lib1528_SOURCES) $(lib1529_SOURCES) $(lib1530_SOURCES) \
+ $(lib1531_SOURCES) $(lib1900_SOURCES) $(lib2033_SOURCES) \
+ $(lib500_SOURCES) $(lib501_SOURCES) $(lib502_SOURCES) \
+ $(lib503_SOURCES) $(lib504_SOURCES) $(lib505_SOURCES) \
+ $(lib506_SOURCES) $(lib507_SOURCES) $(lib508_SOURCES) \
+ $(lib509_SOURCES) $(lib510_SOURCES) $(lib511_SOURCES) \
+ $(lib512_SOURCES) $(lib513_SOURCES) $(lib514_SOURCES) \
+ $(lib515_SOURCES) $(lib516_SOURCES) $(lib517_SOURCES) \
+ $(lib518_SOURCES) $(lib519_SOURCES) $(lib520_SOURCES) \
+ $(lib521_SOURCES) $(lib523_SOURCES) $(lib524_SOURCES) \
+ $(lib525_SOURCES) $(lib526_SOURCES) $(lib527_SOURCES) \
+ $(lib529_SOURCES) $(lib530_SOURCES) $(lib532_SOURCES) \
+ $(lib533_SOURCES) $(lib536_SOURCES) $(lib537_SOURCES) \
+ $(lib539_SOURCES) $(lib540_SOURCES) $(lib541_SOURCES) \
+ $(lib542_SOURCES) $(lib543_SOURCES) $(lib544_SOURCES) \
+ $(lib545_SOURCES) $(lib547_SOURCES) $(lib548_SOURCES) \
+ $(lib549_SOURCES) $(lib552_SOURCES) $(lib553_SOURCES) \
+ $(lib554_SOURCES) $(lib555_SOURCES) $(lib556_SOURCES) \
+ $(lib557_SOURCES) $(lib558_SOURCES) $(lib560_SOURCES) \
+ $(lib562_SOURCES) $(lib564_SOURCES) $(lib565_SOURCES) \
+ $(lib566_SOURCES) $(lib567_SOURCES) $(lib568_SOURCES) \
+ $(lib569_SOURCES) $(lib570_SOURCES) $(lib571_SOURCES) \
+ $(lib572_SOURCES) $(lib573_SOURCES) $(lib574_SOURCES) \
+ $(lib575_SOURCES) $(lib576_SOURCES) $(lib578_SOURCES) \
+ $(lib579_SOURCES) $(lib582_SOURCES) $(lib583_SOURCES) \
+ $(lib585_SOURCES) $(lib586_SOURCES) $(lib587_SOURCES) \
+ $(lib590_SOURCES) $(lib591_SOURCES) $(lib597_SOURCES) \
+ $(lib598_SOURCES) $(lib599_SOURCES) $(libauthretry_SOURCES) \
$(libntlmconnect_SOURCES)
DIST_SOURCES = $(libhostname_la_SOURCES) $(chkhostname_SOURCES) \
$(lib1500_SOURCES) $(lib1501_SOURCES) $(lib1502_SOURCES) \
@@ -889,36 +894,36 @@ DIST_SOURCES = $(libhostname_la_SOURCES) $(chkhostname_SOURCES) \
$(lib1506_SOURCES) $(lib1507_SOURCES) $(lib1508_SOURCES) \
$(lib1509_SOURCES) $(lib1510_SOURCES) $(lib1511_SOURCES) \
$(lib1512_SOURCES) $(lib1513_SOURCES) $(lib1514_SOURCES) \
- $(lib1515_SOURCES) $(lib1520_SOURCES) $(lib1525_SOURCES) \
- $(lib1526_SOURCES) $(lib1527_SOURCES) $(lib1528_SOURCES) \
- $(lib1529_SOURCES) $(lib1530_SOURCES) $(lib1531_SOURCES) \
- $(lib1900_SOURCES) $(lib2033_SOURCES) $(lib500_SOURCES) \
- $(lib501_SOURCES) $(lib502_SOURCES) $(lib503_SOURCES) \
- $(lib504_SOURCES) $(lib505_SOURCES) $(lib506_SOURCES) \
- $(lib507_SOURCES) $(lib508_SOURCES) $(lib509_SOURCES) \
- $(lib510_SOURCES) $(lib511_SOURCES) $(lib512_SOURCES) \
- $(lib513_SOURCES) $(lib514_SOURCES) $(lib515_SOURCES) \
- $(lib516_SOURCES) $(lib517_SOURCES) $(lib518_SOURCES) \
- $(lib519_SOURCES) $(lib520_SOURCES) $(lib521_SOURCES) \
- $(lib523_SOURCES) $(lib524_SOURCES) $(lib525_SOURCES) \
- $(lib526_SOURCES) $(lib527_SOURCES) $(lib529_SOURCES) \
- $(lib530_SOURCES) $(lib532_SOURCES) $(lib533_SOURCES) \
- $(lib536_SOURCES) $(lib537_SOURCES) $(lib539_SOURCES) \
- $(lib540_SOURCES) $(lib541_SOURCES) $(lib542_SOURCES) \
- $(lib543_SOURCES) $(lib544_SOURCES) $(lib545_SOURCES) \
- $(lib547_SOURCES) $(lib548_SOURCES) $(lib549_SOURCES) \
- $(lib552_SOURCES) $(lib553_SOURCES) $(lib554_SOURCES) \
- $(lib555_SOURCES) $(lib556_SOURCES) $(lib557_SOURCES) \
- $(lib558_SOURCES) $(lib560_SOURCES) $(lib562_SOURCES) \
- $(lib564_SOURCES) $(lib565_SOURCES) $(lib566_SOURCES) \
- $(lib567_SOURCES) $(lib568_SOURCES) $(lib569_SOURCES) \
- $(lib570_SOURCES) $(lib571_SOURCES) $(lib572_SOURCES) \
- $(lib573_SOURCES) $(lib574_SOURCES) $(lib575_SOURCES) \
- $(lib576_SOURCES) $(lib578_SOURCES) $(lib579_SOURCES) \
- $(lib582_SOURCES) $(lib583_SOURCES) $(lib585_SOURCES) \
- $(lib586_SOURCES) $(lib587_SOURCES) $(lib590_SOURCES) \
- $(lib591_SOURCES) $(lib597_SOURCES) $(lib598_SOURCES) \
- $(lib599_SOURCES) $(libauthretry_SOURCES) \
+ $(lib1515_SOURCES) $(lib1517_SOURCES) $(lib1520_SOURCES) \
+ $(lib1525_SOURCES) $(lib1526_SOURCES) $(lib1527_SOURCES) \
+ $(lib1528_SOURCES) $(lib1529_SOURCES) $(lib1530_SOURCES) \
+ $(lib1531_SOURCES) $(lib1900_SOURCES) $(lib2033_SOURCES) \
+ $(lib500_SOURCES) $(lib501_SOURCES) $(lib502_SOURCES) \
+ $(lib503_SOURCES) $(lib504_SOURCES) $(lib505_SOURCES) \
+ $(lib506_SOURCES) $(lib507_SOURCES) $(lib508_SOURCES) \
+ $(lib509_SOURCES) $(lib510_SOURCES) $(lib511_SOURCES) \
+ $(lib512_SOURCES) $(lib513_SOURCES) $(lib514_SOURCES) \
+ $(lib515_SOURCES) $(lib516_SOURCES) $(lib517_SOURCES) \
+ $(lib518_SOURCES) $(lib519_SOURCES) $(lib520_SOURCES) \
+ $(lib521_SOURCES) $(lib523_SOURCES) $(lib524_SOURCES) \
+ $(lib525_SOURCES) $(lib526_SOURCES) $(lib527_SOURCES) \
+ $(lib529_SOURCES) $(lib530_SOURCES) $(lib532_SOURCES) \
+ $(lib533_SOURCES) $(lib536_SOURCES) $(lib537_SOURCES) \
+ $(lib539_SOURCES) $(lib540_SOURCES) $(lib541_SOURCES) \
+ $(lib542_SOURCES) $(lib543_SOURCES) $(lib544_SOURCES) \
+ $(lib545_SOURCES) $(lib547_SOURCES) $(lib548_SOURCES) \
+ $(lib549_SOURCES) $(lib552_SOURCES) $(lib553_SOURCES) \
+ $(lib554_SOURCES) $(lib555_SOURCES) $(lib556_SOURCES) \
+ $(lib557_SOURCES) $(lib558_SOURCES) $(lib560_SOURCES) \
+ $(lib562_SOURCES) $(lib564_SOURCES) $(lib565_SOURCES) \
+ $(lib566_SOURCES) $(lib567_SOURCES) $(lib568_SOURCES) \
+ $(lib569_SOURCES) $(lib570_SOURCES) $(lib571_SOURCES) \
+ $(lib572_SOURCES) $(lib573_SOURCES) $(lib574_SOURCES) \
+ $(lib575_SOURCES) $(lib576_SOURCES) $(lib578_SOURCES) \
+ $(lib579_SOURCES) $(lib582_SOURCES) $(lib583_SOURCES) \
+ $(lib585_SOURCES) $(lib586_SOURCES) $(lib587_SOURCES) \
+ $(lib590_SOURCES) $(lib591_SOURCES) $(lib597_SOURCES) \
+ $(lib598_SOURCES) $(lib599_SOURCES) $(libauthretry_SOURCES) \
$(libntlmconnect_SOURCES)
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
@@ -1026,6 +1031,7 @@ LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
@@ -1146,11 +1152,11 @@ top_srcdir = @top_srcdir@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
-# are also available at http://curl.haxx.se/docs/copyright.html.
+# are also available at https://curl.haxx.se/docs/copyright.html.
#
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
# copies of the Software, and permit persons to whom the Software is
@@ -1443,6 +1449,8 @@ lib1514_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1514
lib1515_SOURCES = lib1515.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
lib1515_LDADD = $(TESTUTIL_LIBS)
lib1515_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1515
+lib1517_SOURCES = lib1517.c $(SUPPORTFILES)
+lib1517_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1517
lib1520_SOURCES = lib1520.c $(SUPPORTFILES)
lib1520_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1520
lib1525_SOURCES = lib1525.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
@@ -1656,6 +1664,10 @@ lib1515$(EXEEXT): $(lib1515_OBJECTS) $(lib1515_DEPENDENCIES) $(EXTRA_lib1515_DEP
@rm -f lib1515$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(lib1515_OBJECTS) $(lib1515_LDADD) $(LIBS)
+lib1517$(EXEEXT): $(lib1517_OBJECTS) $(lib1517_DEPENDENCIES) $(EXTRA_lib1517_DEPENDENCIES)
+ @rm -f lib1517$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(lib1517_OBJECTS) $(lib1517_LDADD) $(LIBS)
+
lib1520$(EXEEXT): $(lib1520_OBJECTS) $(lib1520_DEPENDENCIES) $(EXTRA_lib1520_DEPENDENCIES)
@rm -f lib1520$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(lib1520_OBJECTS) $(lib1520_LDADD) $(LIBS)
@@ -2192,6 +2204,8 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1515-first.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1515-lib1515.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1515-testutil.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1517-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1517-lib1517.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1520-first.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1520-lib1520.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1525-first.Po@am__quote@
@@ -3349,6 +3363,34 @@ lib1515-testutil.obj: testutil.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1515_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../../lib/lib1515-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+lib1517-lib1517.o: lib1517.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1517_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1517-lib1517.o -MD -MP -MF $(DEPDIR)/lib1517-lib1517.Tpo -c -o lib1517-lib1517.o `test -f 'lib1517.c' || echo '$(srcdir)/'`lib1517.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib1517-lib1517.Tpo $(DEPDIR)/lib1517-lib1517.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lib1517.c' object='lib1517-lib1517.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1517_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1517-lib1517.o `test -f 'lib1517.c' || echo '$(srcdir)/'`lib1517.c
+
+lib1517-lib1517.obj: lib1517.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1517_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1517-lib1517.obj -MD -MP -MF $(DEPDIR)/lib1517-lib1517.Tpo -c -o lib1517-lib1517.obj `if test -f 'lib1517.c'; then $(CYGPATH_W) 'lib1517.c'; else $(CYGPATH_W) '$(srcdir)/lib1517.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib1517-lib1517.Tpo $(DEPDIR)/lib1517-lib1517.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lib1517.c' object='lib1517-lib1517.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1517_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1517-lib1517.obj `if test -f 'lib1517.c'; then $(CYGPATH_W) 'lib1517.c'; else $(CYGPATH_W) '$(srcdir)/lib1517.c'; fi`
+
+lib1517-first.o: first.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1517_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1517-first.o -MD -MP -MF $(DEPDIR)/lib1517-first.Tpo -c -o lib1517-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib1517-first.Tpo $(DEPDIR)/lib1517-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='first.c' object='lib1517-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1517_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1517-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib1517-first.obj: first.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1517_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1517-first.obj -MD -MP -MF $(DEPDIR)/lib1517-first.Tpo -c -o lib1517-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib1517-first.Tpo $(DEPDIR)/lib1517-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='first.c' object='lib1517-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1517_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1517-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
lib1520-lib1520.o: lib1520.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1520_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1520-lib1520.o -MD -MP -MF $(DEPDIR)/lib1520-lib1520.Tpo -c -o lib1520-lib1520.o `test -f 'lib1520.c' || echo '$(srcdir)/'`lib1520.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib1520-lib1520.Tpo $(DEPDIR)/lib1520-lib1520.Po
@@ -7063,6 +7105,9 @@ uninstall-am:
.PRECIOUS: Makefile
+checksrc:
+ @PERL@ $(top_srcdir)/lib/checksrc.pl $(srcdir)/*.c
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/tests/libtest/Makefile.inc b/tests/libtest/Makefile.inc
index 27d5ee98..7ae66d79 100644
--- a/tests/libtest/Makefile.inc
+++ b/tests/libtest/Makefile.inc
@@ -21,7 +21,7 @@ noinst_PROGRAMS = chkhostname libauthretry libntlmconnect \
lib571 lib572 lib573 lib574 lib575 lib576 lib578 lib579 lib582 \
lib583 lib585 lib586 lib587 lib590 lib591 lib597 lib598 lib599 \
lib1500 lib1501 lib1502 lib1503 lib1504 lib1505 lib1506 lib1507 lib1508 \
- lib1509 lib1510 lib1511 lib1512 lib1513 lib1514 lib1515 \
+ lib1509 lib1510 lib1511 lib1512 lib1513 lib1514 lib1515 lib1517 \
lib1520 \
lib1525 lib1526 lib1527 lib1528 lib1529 lib1530 lib1531 \
lib1900 \
@@ -357,6 +357,9 @@ lib1515_SOURCES = lib1515.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
lib1515_LDADD = $(TESTUTIL_LIBS)
lib1515_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1515
+lib1517_SOURCES = lib1517.c $(SUPPORTFILES)
+lib1517_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1517
+
lib1520_SOURCES = lib1520.c $(SUPPORTFILES)
lib1520_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1520
diff --git a/tests/libtest/chkhostname.c b/tests/libtest/chkhostname.c
index 168294ab..79e382b3 100644
--- a/tests/libtest/chkhostname.c
+++ b/tests/libtest/chkhostname.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -28,12 +28,12 @@
int main(int argc, char *argv[])
{
char buff[HOSTNAME_MAX];
- if (argc != 2) {
+ if(argc != 2) {
printf("Usage: %s EXPECTED_HOSTNAME\n", argv[0]);
return 1;
}
- if (Curl_gethostname(buff, HOSTNAME_MAX)) {
+ if(Curl_gethostname(buff, HOSTNAME_MAX)) {
printf("Curl_gethostname() failed\n");
return 1;
}
diff --git a/tests/libtest/first.c b/tests/libtest/first.c
index 79c73fda..231ae368 100644
--- a/tests/libtest/first.c
+++ b/tests/libtest/first.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -69,7 +69,7 @@ void wait_ms(int ms)
t.tv_sec = ms/1000;
ms -= (int)t.tv_sec * 1000;
t.tv_usec = ms * 1000;
- select_wrapper(0, NULL, NULL , NULL, &t);
+ select_wrapper(0, NULL, NULL, NULL, &t);
}
char *libtest_arg2=NULL;
@@ -153,7 +153,7 @@ int main(int argc, char **argv)
setlocale(LC_ALL, "");
#endif
- if(argc< 2 ) {
+ if(argc< 2) {
fprintf(stderr, "Pass URL as argument please\n");
return 1;
}
diff --git a/tests/libtest/lib1500.c b/tests/libtest/lib1500.c
index 08b917fc..f3c49586 100644
--- a/tests/libtest/lib1500.c
+++ b/tests/libtest/lib1500.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -56,7 +56,7 @@ int test(char *URL)
while(still_running) {
int num;
res = curl_multi_wait(multi, NULL, 0, TEST_HANG_TIMEOUT, &num);
- if (res != CURLM_OK) {
+ if(res != CURLM_OK) {
printf("curl_multi_wait() returned %d\n", res);
res = TEST_ERR_MAJOR_BAD;
goto test_cleanup;
diff --git a/tests/libtest/lib1501.c b/tests/libtest/lib1501.c
index 01a382e8..cc442b52 100644
--- a/tests/libtest/lib1501.c
+++ b/tests/libtest/lib1501.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -41,7 +41,7 @@ static int elapsed(struct timeval *before,
result = (after->tv_sec - before->tv_sec) * 1000000 +
after->tv_usec - before->tv_usec;
- if (result < 0)
+ if(result < 0)
result = 0;
return curlx_sztosi(result);
diff --git a/tests/libtest/lib1502.c b/tests/libtest/lib1502.c
index 2b50c473..e4e1a162 100644
--- a/tests/libtest/lib1502.c
+++ b/tests/libtest/lib1502.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -51,7 +51,8 @@ int test(char *URL)
/* DNS cache injection */
struct curl_slist *dns_cache_list;
- sprintf(redirect, "google.com:%s:%s", libtest_arg2, libtest_arg3);
+ snprintf(redirect, sizeof(redirect), "google.com:%s:%s", libtest_arg2,
+ libtest_arg3);
start_test_timing();
diff --git a/tests/libtest/lib1506.c b/tests/libtest/lib1506.c
index b61c4db7..47fc335c 100644
--- a/tests/libtest/lib1506.c
+++ b/tests/libtest/lib1506.c
@@ -9,7 +9,7 @@
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -46,7 +46,8 @@ int test(char *URL)
/* Create fake DNS entries for serverX.example.com for all handles */
for(i=0; i < NUM_HANDLES; i++) {
- sprintf(dnsentry, "server%d.example.com:%s:%s", i + 1, port, address);
+ snprintf(dnsentry, sizeof(dnsentry), "server%d.example.com:%s:%s",
+ i + 1, port, address);
printf("%s\n", dnsentry);
slist2 = curl_slist_append(slist, dnsentry);
if(!slist2) {
@@ -69,8 +70,9 @@ int test(char *URL)
/* get an easy handle */
easy_init(curl[i]);
/* specify target */
- sprintf(target_url, "http://server%d.example.com:%s/path/1506%04i",
- i + 1, port, i + 1);
+ snprintf(target_url, sizeof(target_url),
+ "http://server%d.example.com:%s/path/1506%04i",
+ i + 1, port, i + 1);
target_url[sizeof(target_url) - 1] = '\0';
easy_setopt(curl[i], CURLOPT_URL, target_url);
/* go verbose */
diff --git a/tests/libtest/lib1507.c b/tests/libtest/lib1507.c
index 5bb61b3b..5a7994eb 100644
--- a/tests/libtest/lib1507.c
+++ b/tests/libtest/lib1507.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -137,7 +137,7 @@ int test(char *URL)
rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
- if (tvdiff(tvnow(), mp_start) > MULTI_PERFORM_HANG_TIMEOUT) {
+ if(tvdiff(tvnow(), mp_start) > MULTI_PERFORM_HANG_TIMEOUT) {
fprintf(stderr, "ABORTING TEST, since it seems "
"that it would have run forever.\n");
break;
diff --git a/tests/libtest/lib1508.c b/tests/libtest/lib1508.c
index 72f26d12..f536422c 100644
--- a/tests/libtest/lib1508.c
+++ b/tests/libtest/lib1508.c
@@ -9,7 +9,7 @@
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib1509.c b/tests/libtest/lib1509.c
index f67c7d6e..df428a0d 100644
--- a/tests/libtest/lib1509.c
+++ b/tests/libtest/lib1509.c
@@ -9,7 +9,7 @@
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib1510.c b/tests/libtest/lib1510.c
index d19a7b5f..25e9fed3 100644
--- a/tests/libtest/lib1510.c
+++ b/tests/libtest/lib1510.c
@@ -9,7 +9,7 @@
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -44,7 +44,8 @@ int test(char *URL)
/* Create fake DNS entries for serverX.example.com for all handles */
for(i=0; i < NUM_URLS; i++) {
- sprintf(dnsentry, "server%d.example.com:%s:%s", i + 1, port, address);
+ snprintf(dnsentry, sizeof(dnsentry), "server%d.example.com:%s:%s", i + 1,
+ port, address);
printf("%s\n", dnsentry);
slist2 = curl_slist_append(slist, dnsentry);
if(!slist2) {
@@ -73,8 +74,9 @@ int test(char *URL)
/* get NUM_HANDLES easy handles */
for(i=0; i < NUM_URLS; i++) {
/* specify target */
- sprintf(target_url, "http://server%d.example.com:%s/path/1510%04i",
- i + 1, port, i + 1);
+ snprintf(target_url, sizeof(target_url),
+ "http://server%d.example.com:%s/path/1510%04i",
+ i + 1, port, i + 1);
target_url[sizeof(target_url) - 1] = '\0';
easy_setopt(curl, CURLOPT_URL, target_url);
diff --git a/tests/libtest/lib1511.c b/tests/libtest/lib1511.c
index a46f9ab5..bec31671 100644
--- a/tests/libtest/lib1511.c
+++ b/tests/libtest/lib1511.c
@@ -9,7 +9,7 @@
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib1512.c b/tests/libtest/lib1512.c
index 86372aac..f4091b45 100644
--- a/tests/libtest/lib1512.c
+++ b/tests/libtest/lib1512.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 2013, Linus Nielsen Feltzing <linus@haxx.se>
+ * Copyright (C) 2013 - 2016, Linus Nielsen Feltzing <linus@haxx.se>
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -49,7 +49,8 @@ int test(char *URL)
return TEST_ERR_MAJOR_BAD;
}
- sprintf(dnsentry, "server.example.curl:%s:%s", port, address);
+ snprintf(dnsentry, sizeof(dnsentry), "server.example.curl:%s:%s",
+ port, address);
printf("%s\n", dnsentry);
slist = curl_slist_append(slist, dnsentry);
@@ -58,8 +59,9 @@ int test(char *URL)
/* get an easy handle */
easy_init(curl[i]);
/* specify target */
- sprintf(target_url, "http://server.example.curl:%s/path/1512%04i",
- port, i + 1);
+ snprintf(target_url, sizeof(target_url),
+ "http://server.example.curl:%s/path/1512%04i",
+ port, i + 1);
target_url[sizeof(target_url) - 1] = '\0';
easy_setopt(curl[i], CURLOPT_URL, target_url);
/* go verbose */
diff --git a/tests/libtest/lib1513.c b/tests/libtest/lib1513.c
index 7a9a1a0f..d0123f1f 100644
--- a/tests/libtest/lib1513.c
+++ b/tests/libtest/lib1513.c
@@ -9,7 +9,7 @@
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib1514.c b/tests/libtest/lib1514.c
index ec8f8a32..b4ab9dcc 100644
--- a/tests/libtest/lib1514.c
+++ b/tests/libtest/lib1514.c
@@ -9,7 +9,7 @@
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib1515.c b/tests/libtest/lib1515.c
index 11c57aa2..2fd19bb7 100644
--- a/tests/libtest/lib1515.c
+++ b/tests/libtest/lib1515.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -39,7 +39,8 @@
#define sleep(s) Sleep(s * 1000)
#endif
-static int debug_callback(CURL *curl, curl_infotype info, char *msg, size_t len, void *ptr)
+static int debug_callback(CURL *curl, curl_infotype info, char *msg,
+ size_t len, void *ptr)
{
(void)curl;
(void)ptr;
@@ -121,7 +122,8 @@ int test(char *URL)
int i;
int count = 2;
- snprintf(dns_entry, sizeof(dns_entry), "testserver.example.com:%s:%s", port, address);
+ snprintf(dns_entry, sizeof(dns_entry), "testserver.example.com:%s:%s",
+ port, address);
start_test_timing();
@@ -130,7 +132,8 @@ int test(char *URL)
for(i = 1; i <= count; i++) {
char target_url[256];
- snprintf(target_url, sizeof(target_url), "http://testserver.example.com:%s/%s%04d", port, path, i);
+ snprintf(target_url, sizeof(target_url),
+ "http://testserver.example.com:%s/%s%04d", port, path, i);
/* second request must succeed like the first one */
if((res = do_one_request(multi, target_url, dns_entry)))
diff --git a/tests/libtest/lib1517.c b/tests/libtest/lib1517.c
new file mode 100644
index 00000000..e270ed74
--- /dev/null
+++ b/tests/libtest/lib1517.c
@@ -0,0 +1,116 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.haxx.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+#include "test.h"
+
+#include "memdebug.h"
+
+static char data[]="this is what we post to the silly web server\n";
+
+struct WriteThis {
+ char *readptr;
+ size_t sizeleft;
+};
+
+static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp)
+{
+ struct WriteThis *pooh = (struct WriteThis *)userp;
+ size_t tocopy = size * nmemb;
+
+ /* Wait one second before return POST data *
+ * so libcurl will wait before sending request body */
+ wait_ms(1000);
+
+ if(tocopy < 1 || !pooh->sizeleft)
+ return 0;
+
+ if(pooh->sizeleft < tocopy)
+ tocopy = pooh->sizeleft;
+
+ memcpy(ptr, pooh->readptr, tocopy);/* copy requested data */
+ pooh->readptr += tocopy; /* advance pointer */
+ pooh->sizeleft -= tocopy; /* less data left */
+ return tocopy;
+}
+
+int test(char *URL)
+{
+ CURL *curl;
+ CURLcode res=CURLE_OK;
+
+ struct WriteThis pooh;
+
+ pooh.readptr = data;
+ pooh.sizeleft = strlen(data);
+
+ if(curl_global_init(CURL_GLOBAL_ALL)) {
+ fprintf(stderr, "curl_global_init() failed\n");
+ return TEST_ERR_MAJOR_BAD;
+ }
+
+ curl = curl_easy_init();
+ if(!curl) {
+ fprintf(stderr, "curl_easy_init() failed\n");
+ curl_global_cleanup();
+ return TEST_ERR_MAJOR_BAD;
+ }
+
+ /* First set the URL that is about to receive our POST. */
+ test_setopt(curl, CURLOPT_URL, URL);
+
+ /* Now specify we want to POST data */
+ test_setopt(curl, CURLOPT_POST, 1L);
+
+#ifdef CURL_DOES_CONVERSIONS
+ /* Convert the POST data to ASCII */
+ test_setopt(curl, CURLOPT_TRANSFERTEXT, 1L);
+#endif
+
+ /* Set the expected POST size */
+ test_setopt(curl, CURLOPT_POSTFIELDSIZE, (long)pooh.sizeleft);
+
+ /* we want to use our own read function */
+ test_setopt(curl, CURLOPT_READFUNCTION, read_callback);
+
+ /* pointer to pass to our read function */
+ test_setopt(curl, CURLOPT_READDATA, &pooh);
+
+ /* get verbose debug output please */
+ test_setopt(curl, CURLOPT_VERBOSE, 1L);
+
+ /* include headers in the output */
+ test_setopt(curl, CURLOPT_HEADER, 1L);
+
+ /* detect HTTP error codes >= 400 */
+ /* test_setopt(curl, CURLOPT_FAILONERROR, 1L); */
+
+
+ /* Perform the request, res will get the return code */
+ res = curl_easy_perform(curl);
+
+test_cleanup:
+
+ /* always cleanup */
+ curl_easy_cleanup(curl);
+ curl_global_cleanup();
+
+ return res;
+}
diff --git a/tests/libtest/lib1520.c b/tests/libtest/lib1520.c
index c6d2e820..a4ce79b5 100644
--- a/tests/libtest/lib1520.c
+++ b/tests/libtest/lib1520.c
@@ -9,7 +9,7 @@
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib1525.c b/tests/libtest/lib1525.c
index 957b4295..c58ebeda 100644
--- a/tests/libtest/lib1525.c
+++ b/tests/libtest/lib1525.c
@@ -5,12 +5,12 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 2014, Vijay Panghal, <vpanghal@maginatics.com>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -35,7 +35,7 @@ static char data [] = "Hello Cloud!\n";
static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *stream)
{
size_t amount = nmemb * size; /* Total bytes curl wants */
- if (amount < strlen(data)) {
+ if(amount < strlen(data)) {
return strlen(data);
}
(void)stream;
@@ -64,7 +64,7 @@ int test(char *URL)
hhl = curl_slist_append(hhl, "User-Agent: Http Agent");
- if (!hhl) {
+ if(!hhl) {
goto test_cleanup;
}
diff --git a/tests/libtest/lib1526.c b/tests/libtest/lib1526.c
index ec21fb00..ef66a484 100644
--- a/tests/libtest/lib1526.c
+++ b/tests/libtest/lib1526.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2014, Vijay Panghal, <vpanghal@maginatics.com>, et al.
+ * Copyright (C) 1998 - 2016, Vijay Panghal, <vpanghal@maginatics.com>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -34,7 +34,7 @@ static char data [] = "Hello Cloud!\n";
static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *stream)
{
size_t amount = nmemb * size; /* Total bytes curl wants */
- if (amount < strlen(data)) {
+ if(amount < strlen(data)) {
return strlen(data);
}
(void)stream;
@@ -62,11 +62,11 @@ int test(char *URL)
hhl = curl_slist_append(hhl, "User-Agent: Http Agent");
phl = curl_slist_append(phl, "User-Agent: Proxy Agent");
- if (!hhl || !phl) {
+ if(!hhl || !phl) {
goto test_cleanup;
}
tmp = curl_slist_append(phl, "Expect:");
- if (!tmp) {
+ if(!tmp) {
goto test_cleanup;
}
phl = tmp;
diff --git a/tests/libtest/lib1527.c b/tests/libtest/lib1527.c
index 1122d8ec..f008cf1e 100644
--- a/tests/libtest/lib1527.c
+++ b/tests/libtest/lib1527.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2014, Vijay Panghal, <vpanghal@maginatics.com>, et al.
+ * Copyright (C) 1998 - 2016, Vijay Panghal, <vpanghal@maginatics.com>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -34,7 +34,7 @@ static char data [] = "Hello Cloud!\n";
static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *stream)
{
size_t amount = nmemb * size; /* Total bytes curl wants */
- if (amount < strlen(data)) {
+ if(amount < strlen(data)) {
return strlen(data);
}
(void)stream;
@@ -62,11 +62,11 @@ int test(char *URL)
}
hhl = curl_slist_append(hhl, "User-Agent: Http Agent");
- if (!hhl) {
+ if(!hhl) {
goto test_cleanup;
}
tmp = curl_slist_append(hhl, "Expect: 100-continue");
- if (!tmp) {
+ if(!tmp) {
goto test_cleanup;
}
hhl = tmp;
diff --git a/tests/libtest/lib1528.c b/tests/libtest/lib1528.c
index 94a7cd02..09af481f 100644
--- a/tests/libtest/lib1528.c
+++ b/tests/libtest/lib1528.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -46,7 +46,7 @@ int test(char *URL)
hhl = curl_slist_append(hhl, "User-Agent: Http Agent");
phl = curl_slist_append(phl, "Proxy-User-Agent: Http Agent2");
- if (!hhl) {
+ if(!hhl) {
goto test_cleanup;
}
diff --git a/tests/libtest/lib1529.c b/tests/libtest/lib1529.c
index 3def142a..3333ae69 100644
--- a/tests/libtest/lib1529.c
+++ b/tests/libtest/lib1529.c
@@ -9,7 +9,7 @@
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib1530.c b/tests/libtest/lib1530.c
index 76231c97..d1ca34c2 100644
--- a/tests/libtest/lib1530.c
+++ b/tests/libtest/lib1530.c
@@ -9,7 +9,7 @@
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib1531.c b/tests/libtest/lib1531.c
index a0612a9d..b21d0673 100644
--- a/tests/libtest/lib1531.c
+++ b/tests/libtest/lib1531.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -49,7 +49,8 @@ int test(char *URL)
/* set the options (I left out a few, you'll get the point anyway) */
curl_easy_setopt(easy, CURLOPT_URL, URL);
- curl_easy_setopt(easy, CURLOPT_POSTFIELDSIZE_LARGE, (curl_off_t)testDataSize);
+ curl_easy_setopt(easy, CURLOPT_POSTFIELDSIZE_LARGE,
+ (curl_off_t)testDataSize);
curl_easy_setopt(easy, CURLOPT_POSTFIELDS, testData);
/* we start some action by calling perform right away */
@@ -87,8 +88,7 @@ int test(char *URL)
/* get file descriptors from the transfers */
mc = curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
- if(mc != CURLM_OK)
- {
+ if(mc != CURLM_OK) {
fprintf(stderr, "curl_multi_fdset() failed, code %d.\n", mc);
break;
}
@@ -127,8 +127,8 @@ int test(char *URL)
} while(still_running);
/* See how the transfers went */
- while ((msg = curl_multi_info_read(multi_handle, &msgs_left))) {
- if (msg->msg == CURLMSG_DONE) {
+ while((msg = curl_multi_info_read(multi_handle, &msgs_left))) {
+ if(msg->msg == CURLMSG_DONE) {
printf("HTTP transfer completed with status %d\n", msg->data.result);
break;
}
diff --git a/tests/libtest/lib1900.c b/tests/libtest/lib1900.c
index 2f64742a..4502fc0d 100644
--- a/tests/libtest/lib1900.c
+++ b/tests/libtest/lib1900.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 2013, Linus Nielsen Feltzing, <linus@haxx.se>
+ * Copyright (C) 2013 - 2016, Linus Nielsen Feltzing, <linus@haxx.se>
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -113,7 +113,7 @@ static void setup_handle(char *base_url, CURLM *m, int handlenum)
{
char urlbuf[256];
- sprintf(urlbuf, "%s%s", base_url, urlstring[handlenum]);
+ snprintf(urlbuf, sizeof(urlbuf), "%s%s", base_url, urlstring[handlenum]);
curl_easy_setopt(handles[handlenum], CURLOPT_URL, urlbuf);
curl_easy_setopt(handles[handlenum], CURLOPT_VERBOSE, 1L);
curl_easy_setopt(handles[handlenum], CURLOPT_FAILONERROR, 1L);
@@ -192,12 +192,12 @@ int test(char *URL)
abort_on_test_timeout();
/* See how the transfers went */
- while ((msg = curl_multi_info_read(m, &msgs_left))) {
- if (msg->msg == CURLMSG_DONE) {
+ while((msg = curl_multi_info_read(m, &msgs_left))) {
+ if(msg->msg == CURLMSG_DONE) {
int i, found = 0;
/* Find out which handle this message is about */
- for (i = 0; i < num_handles; i++) {
+ for(i = 0; i < num_handles; i++) {
found = (msg->easy_handle == handles[i]);
if(found)
break;
diff --git a/tests/libtest/lib500.c b/tests/libtest/lib500.c
index 4d622084..43b05982 100644
--- a/tests/libtest/lib500.c
+++ b/tests/libtest/lib500.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -63,12 +63,12 @@ int test(char *URL)
CURL *curl;
char *ipstr=NULL;
- if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
+ if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
fprintf(stderr, "curl_global_init() failed\n");
return TEST_ERR_MAJOR_BAD;
}
- if ((curl = curl_easy_init()) == NULL) {
+ if((curl = curl_easy_init()) == NULL) {
fprintf(stderr, "curl_easy_init() failed\n");
curl_global_cleanup();
return TEST_ERR_MAJOR_BAD;
@@ -92,42 +92,42 @@ int test(char *URL)
if(!res) {
res = curl_easy_getinfo(curl, CURLINFO_PRIMARY_IP, &ipstr);
- if (libtest_arg2) {
+ if(libtest_arg2) {
FILE *moo = fopen(libtest_arg2, "wb");
if(moo) {
- double time_namelookup;
- double time_connect;
- double time_pretransfer;
- double time_starttransfer;
- double time_total;
- fprintf(moo, "IP: %s\n", ipstr);
- curl_easy_getinfo(curl, CURLINFO_NAMELOOKUP_TIME, &time_namelookup);
- curl_easy_getinfo(curl, CURLINFO_CONNECT_TIME, &time_connect);
- curl_easy_getinfo(curl, CURLINFO_PRETRANSFER_TIME, &time_pretransfer);
- curl_easy_getinfo(curl, CURLINFO_STARTTRANSFER_TIME,
- &time_starttransfer);
- curl_easy_getinfo(curl, CURLINFO_TOTAL_TIME, &time_total);
-
- /* since the timing will always vary we only compare relative differences
- between these 5 times */
- if(time_namelookup > time_connect) {
- fprintf(moo, "namelookup vs connect: %f %f\n",
- time_namelookup, time_connect);
- }
- if(time_connect > time_pretransfer) {
- fprintf(moo, "connect vs pretransfer: %f %f\n",
- time_connect, time_pretransfer);
- }
- if(time_pretransfer > time_starttransfer) {
- fprintf(moo, "pretransfer vs starttransfer: %f %f\n",
- time_pretransfer, time_starttransfer);
- }
- if(time_starttransfer > time_total) {
- fprintf(moo, "starttransfer vs total: %f %f\n",
- time_starttransfer, time_total);
- }
-
- fclose(moo);
+ double time_namelookup;
+ double time_connect;
+ double time_pretransfer;
+ double time_starttransfer;
+ double time_total;
+ fprintf(moo, "IP: %s\n", ipstr);
+ curl_easy_getinfo(curl, CURLINFO_NAMELOOKUP_TIME, &time_namelookup);
+ curl_easy_getinfo(curl, CURLINFO_CONNECT_TIME, &time_connect);
+ curl_easy_getinfo(curl, CURLINFO_PRETRANSFER_TIME, &time_pretransfer);
+ curl_easy_getinfo(curl, CURLINFO_STARTTRANSFER_TIME,
+ &time_starttransfer);
+ curl_easy_getinfo(curl, CURLINFO_TOTAL_TIME, &time_total);
+
+ /* since the timing will always vary we only compare relative
+ differences between these 5 times */
+ if(time_namelookup > time_connect) {
+ fprintf(moo, "namelookup vs connect: %f %f\n",
+ time_namelookup, time_connect);
+ }
+ if(time_connect > time_pretransfer) {
+ fprintf(moo, "connect vs pretransfer: %f %f\n",
+ time_connect, time_pretransfer);
+ }
+ if(time_pretransfer > time_starttransfer) {
+ fprintf(moo, "pretransfer vs starttransfer: %f %f\n",
+ time_pretransfer, time_starttransfer);
+ }
+ if(time_starttransfer > time_total) {
+ fprintf(moo, "starttransfer vs total: %f %f\n",
+ time_starttransfer, time_total);
+ }
+
+ fclose(moo);
}
}
}
diff --git a/tests/libtest/lib501.c b/tests/libtest/lib501.c
index 26275f97..2a105f0c 100644
--- a/tests/libtest/lib501.c
+++ b/tests/libtest/lib501.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -30,12 +30,12 @@ int test(char *URL)
(void)URL; /* we don't use this */
- if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
+ if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
fprintf(stderr, "curl_global_init() failed\n");
return TEST_ERR_MAJOR_BAD;
}
- if ((curl = curl_easy_init()) == NULL) {
+ if((curl = curl_easy_init()) == NULL) {
fprintf(stderr, "curl_easy_init() failed\n");
curl_global_cleanup();
return TEST_ERR_MAJOR_BAD;
diff --git a/tests/libtest/lib502.c b/tests/libtest/lib502.c
index 554583ae..7cf6415a 100644
--- a/tests/libtest/lib502.c
+++ b/tests/libtest/lib502.c
@@ -9,7 +9,7 @@
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib503.c b/tests/libtest/lib503.c
index 50277f7d..2eb28748 100644
--- a/tests/libtest/lib503.c
+++ b/tests/libtest/lib503.c
@@ -9,7 +9,7 @@
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib504.c b/tests/libtest/lib504.c
index 358fc98d..3466dc94 100644
--- a/tests/libtest/lib504.c
+++ b/tests/libtest/lib504.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -50,7 +50,7 @@ int test(char *URL)
/* The point here is that there must not be anything running on the given
proxy port */
- if (libtest_arg2)
+ if(libtest_arg2)
easy_setopt(c, CURLOPT_PROXY, libtest_arg2);
easy_setopt(c, CURLOPT_URL, URL);
easy_setopt(c, CURLOPT_VERBOSE, 1L);
diff --git a/tests/libtest/lib505.c b/tests/libtest/lib505.c
index 9592e0fa..127fde77 100644
--- a/tests/libtest/lib505.c
+++ b/tests/libtest/lib505.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -38,8 +38,8 @@ int test(char *URL)
{
CURL *curl;
CURLcode res = CURLE_OK;
- FILE *hd_src ;
- int hd ;
+ FILE *hd_src;
+ int hd;
struct_stat file_info;
struct curl_slist *hl;
int error;
@@ -48,7 +48,7 @@ int test(char *URL)
const char *buf_1 = "RNFR 505";
const char *buf_2 = "RNTO 505-forreal";
- if (!libtest_arg2) {
+ if(!libtest_arg2) {
fprintf(stderr, "Usage: <url> <file-to-upload>\n");
return TEST_ERR_USAGE;
}
@@ -56,7 +56,7 @@ int test(char *URL)
hd_src = fopen(libtest_arg2, "rb");
if(NULL == hd_src) {
error = ERRNO;
- fprintf(stderr, "fopen() failed with error: %d %s\n",
+ fprintf(stderr, "fopen failed with error: %d %s\n",
error, strerror(error));
fprintf(stderr, "Error opening file: %s\n", libtest_arg2);
return TEST_ERR_MAJOR_BAD; /* if this happens things are major weird */
@@ -80,14 +80,15 @@ int test(char *URL)
return TEST_ERR_MAJOR_BAD;
}
- if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
+ if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
fprintf(stderr, "curl_global_init() failed\n");
fclose(hd_src);
return TEST_ERR_MAJOR_BAD;
}
/* get a curl handle */
- if ((curl = curl_easy_init()) == NULL) {
+ curl = curl_easy_init();
+ if(!curl) {
fprintf(stderr, "curl_easy_init() failed\n");
curl_global_cleanup();
fclose(hd_src);
@@ -96,14 +97,16 @@ int test(char *URL)
/* build a list of commands to pass to libcurl */
- if ((hl = curl_slist_append(headerlist, buf_1)) == NULL) {
+ hl = curl_slist_append(headerlist, buf_1);
+ if(!hl) {
fprintf(stderr, "curl_slist_append() failed\n");
curl_easy_cleanup(curl);
curl_global_cleanup();
fclose(hd_src);
return TEST_ERR_MAJOR_BAD;
}
- if ((headerlist = curl_slist_append(hl, buf_2)) == NULL) {
+ headerlist = curl_slist_append(hl, buf_2);
+ if(!headerlist) {
fprintf(stderr, "curl_slist_append() failed\n");
curl_slist_free_all(hl);
curl_easy_cleanup(curl);
@@ -120,7 +123,7 @@ int test(char *URL)
test_setopt(curl, CURLOPT_VERBOSE, 1L);
/* specify target */
- test_setopt(curl,CURLOPT_URL, URL);
+ test_setopt(curl, CURLOPT_URL, URL);
/* pass in that last of FTP commands to run after the transfer */
test_setopt(curl, CURLOPT_POSTQUOTE, headerlist);
diff --git a/tests/libtest/lib506.c b/tests/libtest/lib506.c
index 6dcc36d3..8de30c20 100644
--- a/tests/libtest/lib506.c
+++ b/tests/libtest/lib506.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -40,8 +40,8 @@ struct userdata {
int lock[3];
/* lock callback */
-static void my_lock(CURL *handle, curl_lock_data data, curl_lock_access laccess,
- void *useptr )
+static void my_lock(CURL *handle, curl_lock_data data,
+ curl_lock_access laccess, void *useptr)
{
const char *what;
struct userdata *user = (struct userdata *)useptr;
@@ -50,7 +50,7 @@ static void my_lock(CURL *handle, curl_lock_data data, curl_lock_access laccess,
(void)handle;
(void)laccess;
- switch ( data ) {
+ switch (data) {
case CURL_LOCK_DATA_SHARE:
what = "share";
locknum = 0;
@@ -80,13 +80,13 @@ static void my_lock(CURL *handle, curl_lock_data data, curl_lock_access laccess,
}
/* unlock callback */
-static void my_unlock(CURL *handle, curl_lock_data data, void *useptr )
+static void my_unlock(CURL *handle, curl_lock_data data, void *useptr)
{
const char *what;
struct userdata *user = (struct userdata *)useptr;
int locknum;
(void)handle;
- switch ( data ) {
+ switch (data) {
case CURL_LOCK_DATA_SHARE:
what = "share";
locknum = 0;
@@ -120,7 +120,7 @@ static void my_unlock(CURL *handle, curl_lock_data data, void *useptr )
static struct curl_slist *sethost(struct curl_slist *headers)
{
(void)headers;
- return curl_slist_append(NULL, HOSTHEADER );
+ return curl_slist_append(NULL, HOSTHEADER);
}
@@ -133,7 +133,8 @@ static void *fire(void *ptr)
CURL *curl;
int i=0;
- if ((curl = curl_easy_init()) == NULL) {
+ curl = curl_easy_init();
+ if(!curl) {
fprintf(stderr, "curl_easy_init() failed\n");
return NULL;
}
@@ -142,17 +143,17 @@ static void *fire(void *ptr)
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_URL, tdata->url);
- printf( "CURLOPT_SHARE\n" );
+ printf("CURLOPT_SHARE\n");
curl_easy_setopt(curl, CURLOPT_SHARE, tdata->share);
- printf( "PERFORM\n" );
+ printf("PERFORM\n");
code = curl_easy_perform(curl);
- if( code != CURLE_OK ) {
+ if(code) {
fprintf(stderr, "perform url '%s' repeat %d failed, curlcode %d\n",
tdata->url, i, (int)code);
}
- printf( "CLEANUP\n" );
+ printf("CLEANUP\n");
curl_easy_cleanup(curl);
curl_slist_free_all(headers);
@@ -186,42 +187,42 @@ int test(char *URL)
user.text = (char *)"Pigs in space";
user.counter = 0;
- printf( "GLOBAL_INIT\n" );
- if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
+ printf("GLOBAL_INIT\n");
+ if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
fprintf(stderr, "curl_global_init() failed\n");
return TEST_ERR_MAJOR_BAD;
}
/* prepare share */
- printf( "SHARE_INIT\n" );
- if ((share = curl_share_init()) == NULL) {
+ printf("SHARE_INIT\n");
+ if((share = curl_share_init()) == NULL) {
fprintf(stderr, "curl_share_init() failed\n");
curl_global_cleanup();
return TEST_ERR_MAJOR_BAD;
}
- if ( CURLSHE_OK == scode ) {
- printf( "CURLSHOPT_LOCKFUNC\n" );
- scode = curl_share_setopt( share, CURLSHOPT_LOCKFUNC, my_lock);
+ if(CURLSHE_OK == scode) {
+ printf("CURLSHOPT_LOCKFUNC\n");
+ scode = curl_share_setopt(share, CURLSHOPT_LOCKFUNC, my_lock);
}
- if ( CURLSHE_OK == scode ) {
- printf( "CURLSHOPT_UNLOCKFUNC\n" );
- scode = curl_share_setopt( share, CURLSHOPT_UNLOCKFUNC, my_unlock);
+ if(CURLSHE_OK == scode) {
+ printf("CURLSHOPT_UNLOCKFUNC\n");
+ scode = curl_share_setopt(share, CURLSHOPT_UNLOCKFUNC, my_unlock);
}
- if ( CURLSHE_OK == scode ) {
- printf( "CURLSHOPT_USERDATA\n" );
- scode = curl_share_setopt( share, CURLSHOPT_USERDATA, &user);
+ if(CURLSHE_OK == scode) {
+ printf("CURLSHOPT_USERDATA\n");
+ scode = curl_share_setopt(share, CURLSHOPT_USERDATA, &user);
}
- if ( CURLSHE_OK == scode ) {
- printf( "CURL_LOCK_DATA_COOKIE\n" );
- scode = curl_share_setopt( share, CURLSHOPT_SHARE, CURL_LOCK_DATA_COOKIE);
+ if(CURLSHE_OK == scode) {
+ printf("CURL_LOCK_DATA_COOKIE\n");
+ scode = curl_share_setopt(share, CURLSHOPT_SHARE, CURL_LOCK_DATA_COOKIE);
}
- if ( CURLSHE_OK == scode ) {
- printf( "CURL_LOCK_DATA_DNS\n" );
- scode = curl_share_setopt( share, CURLSHOPT_SHARE, CURL_LOCK_DATA_DNS);
+ if(CURLSHE_OK == scode) {
+ printf("CURL_LOCK_DATA_DNS\n");
+ scode = curl_share_setopt(share, CURLSHOPT_SHARE, CURL_LOCK_DATA_DNS);
}
- if ( CURLSHE_OK != scode ) {
+ if(CURLSHE_OK != scode) {
fprintf(stderr, "curl_share_setopt() failed\n");
curl_share_cleanup(share);
curl_global_cleanup();
@@ -229,149 +230,145 @@ int test(char *URL)
}
/* initial cookie manipulation */
- if ((curl = curl_easy_init()) == NULL) {
+ if((curl = curl_easy_init()) == NULL) {
fprintf(stderr, "curl_easy_init() failed\n");
curl_share_cleanup(share);
curl_global_cleanup();
return TEST_ERR_MAJOR_BAD;
}
- printf( "CURLOPT_SHARE\n" );
- test_setopt( curl, CURLOPT_SHARE, share );
- printf( "CURLOPT_COOKIELIST injected_and_clobbered\n" );
- test_setopt( curl, CURLOPT_COOKIELIST,
+ printf("CURLOPT_SHARE\n");
+ test_setopt(curl, CURLOPT_SHARE, share);
+ printf("CURLOPT_COOKIELIST injected_and_clobbered\n");
+ test_setopt(curl, CURLOPT_COOKIELIST,
"Set-Cookie: injected_and_clobbered=yes; "
- "domain=host.foo.com; expires=Sat Feb 2 11:56:27 GMT 2030" );
- printf( "CURLOPT_COOKIELIST ALL\n" );
- test_setopt( curl, CURLOPT_COOKIELIST, "ALL" );
- printf( "CURLOPT_COOKIELIST session\n" );
- test_setopt( curl, CURLOPT_COOKIELIST, "Set-Cookie: session=elephants" );
- printf( "CURLOPT_COOKIELIST injected\n" );
- test_setopt( curl, CURLOPT_COOKIELIST,
+ "domain=host.foo.com; expires=Sat Feb 2 11:56:27 GMT 2030");
+ printf("CURLOPT_COOKIELIST ALL\n");
+ test_setopt(curl, CURLOPT_COOKIELIST, "ALL");
+ printf("CURLOPT_COOKIELIST session\n");
+ test_setopt(curl, CURLOPT_COOKIELIST, "Set-Cookie: session=elephants");
+ printf("CURLOPT_COOKIELIST injected\n");
+ test_setopt(curl, CURLOPT_COOKIELIST,
"Set-Cookie: injected=yes; domain=host.foo.com; "
- "expires=Sat Feb 2 11:56:27 GMT 2030" );
- printf( "CURLOPT_COOKIELIST SESS\n" );
- test_setopt( curl, CURLOPT_COOKIELIST, "SESS" );
- printf( "CLEANUP\n" );
- curl_easy_cleanup( curl );
+ "expires=Sat Feb 2 11:56:27 GMT 2030");
+ printf("CURLOPT_COOKIELIST SESS\n");
+ test_setopt(curl, CURLOPT_COOKIELIST, "SESS");
+ printf("CLEANUP\n");
+ curl_easy_cleanup(curl);
res = 0;
/* start treads */
- for (i=1; i<=THREADS; i++ ) {
+ for(i=1; i<=THREADS; i++) {
/* set thread data */
- tdata.url = suburl( URL, i ); /* must be curl_free()d */
+ tdata.url = suburl(URL, i); /* must be curl_free()d */
tdata.share = share;
/* simulate thread, direct call of "thread" function */
- printf( "*** run %d\n",i );
- fire( &tdata );
-
- curl_free( tdata.url );
+ printf("*** run %d\n",i);
+ fire(&tdata);
+ curl_free(tdata.url);
}
/* fetch a another one and save cookies */
- printf( "*** run %d\n", i );
- if ((curl = curl_easy_init()) == NULL) {
+ printf("*** run %d\n", i);
+ if((curl = curl_easy_init()) == NULL) {
fprintf(stderr, "curl_easy_init() failed\n");
curl_share_cleanup(share);
curl_global_cleanup();
return TEST_ERR_MAJOR_BAD;
}
- url = suburl( URL, i );
- headers = sethost( NULL );
- test_setopt( curl, CURLOPT_HTTPHEADER, headers );
- test_setopt( curl, CURLOPT_URL, url );
- printf( "CURLOPT_SHARE\n" );
- test_setopt( curl, CURLOPT_SHARE, share );
- printf( "CURLOPT_COOKIEJAR\n" );
- test_setopt( curl, CURLOPT_COOKIEJAR, JAR );
- printf( "CURLOPT_COOKIELIST FLUSH\n" );
- test_setopt( curl, CURLOPT_COOKIELIST, "FLUSH" );
-
- printf( "PERFORM\n" );
- curl_easy_perform( curl );
-
- printf( "CLEANUP\n" );
- curl_easy_cleanup( curl );
+ url = suburl(URL, i);
+ headers = sethost(NULL);
+ test_setopt(curl, CURLOPT_HTTPHEADER, headers);
+ test_setopt(curl, CURLOPT_URL, url);
+ printf("CURLOPT_SHARE\n");
+ test_setopt(curl, CURLOPT_SHARE, share);
+ printf("CURLOPT_COOKIEJAR\n");
+ test_setopt(curl, CURLOPT_COOKIEJAR, JAR);
+ printf("CURLOPT_COOKIELIST FLUSH\n");
+ test_setopt(curl, CURLOPT_COOKIELIST, "FLUSH");
+
+ printf("PERFORM\n");
+ curl_easy_perform(curl);
+
+ printf("CLEANUP\n");
+ curl_easy_cleanup(curl);
curl_free(url);
- curl_slist_free_all( headers );
+ curl_slist_free_all(headers);
/* load cookies */
- if ((curl = curl_easy_init()) == NULL) {
+ if((curl = curl_easy_init()) == NULL) {
fprintf(stderr, "curl_easy_init() failed\n");
curl_share_cleanup(share);
curl_global_cleanup();
return TEST_ERR_MAJOR_BAD;
}
- url = suburl( URL, i );
- headers = sethost( NULL );
- test_setopt( curl, CURLOPT_HTTPHEADER, headers );
- test_setopt( curl, CURLOPT_URL, url );
- printf( "CURLOPT_SHARE\n" );
- test_setopt( curl, CURLOPT_SHARE, share );
- printf( "CURLOPT_COOKIELIST ALL\n" );
- test_setopt( curl, CURLOPT_COOKIELIST, "ALL" );
- printf( "CURLOPT_COOKIEJAR\n" );
- test_setopt( curl, CURLOPT_COOKIEFILE, JAR );
- printf( "CURLOPT_COOKIELIST RELOAD\n" );
- test_setopt( curl, CURLOPT_COOKIELIST, "RELOAD" );
+ url = suburl(URL, i);
+ headers = sethost(NULL);
+ test_setopt(curl, CURLOPT_HTTPHEADER, headers);
+ test_setopt(curl, CURLOPT_URL, url);
+ printf("CURLOPT_SHARE\n");
+ test_setopt(curl, CURLOPT_SHARE, share);
+ printf("CURLOPT_COOKIELIST ALL\n");
+ test_setopt(curl, CURLOPT_COOKIELIST, "ALL");
+ printf("CURLOPT_COOKIEJAR\n");
+ test_setopt(curl, CURLOPT_COOKIEFILE, JAR);
+ printf("CURLOPT_COOKIELIST RELOAD\n");
+ test_setopt(curl, CURLOPT_COOKIELIST, "RELOAD");
code = curl_easy_getinfo(curl, CURLINFO_COOKIELIST, &cookies);
- if ( code != CURLE_OK )
- {
+ if(code != CURLE_OK) {
fprintf(stderr, "curl_easy_getinfo() failed\n");
res = TEST_ERR_MAJOR_BAD;
goto test_cleanup;
}
printf("loaded cookies:\n");
- if ( !cookies )
- {
+ if(!cookies) {
fprintf(stderr, " reloading cookies from '%s' failed\n", JAR);
res = TEST_ERR_MAJOR_BAD;
goto test_cleanup;
}
printf("-----------------\n");
next_cookie = cookies;
- while ( next_cookie )
- {
- printf( " %s\n", next_cookie->data );
+ while(next_cookie) {
+ printf(" %s\n", next_cookie->data);
next_cookie = next_cookie->next;
}
printf("-----------------\n");
- curl_slist_free_all( cookies );
+ curl_slist_free_all(cookies);
/* try to free share, expect to fail because share is in use*/
- printf( "try SHARE_CLEANUP...\n" );
- scode = curl_share_cleanup( share );
- if ( scode==CURLSHE_OK )
- {
+ printf("try SHARE_CLEANUP...\n");
+ scode = curl_share_cleanup(share);
+ if(scode==CURLSHE_OK) {
fprintf(stderr, "curl_share_cleanup succeed but error expected\n");
share = NULL;
- } else {
- printf( "SHARE_CLEANUP failed, correct\n" );
+ }
+ else {
+ printf("SHARE_CLEANUP failed, correct\n");
}
test_cleanup:
/* clean up last handle */
- printf( "CLEANUP\n" );
- curl_easy_cleanup( curl );
- curl_slist_free_all( headers );
+ printf("CLEANUP\n");
+ curl_easy_cleanup(curl);
+ curl_slist_free_all(headers);
curl_free(url);
/* free share */
- printf( "SHARE_CLEANUP\n" );
- scode = curl_share_cleanup( share );
- if ( scode!=CURLSHE_OK )
+ printf("SHARE_CLEANUP\n");
+ scode = curl_share_cleanup(share);
+ if(scode!=CURLSHE_OK)
fprintf(stderr, "curl_share_cleanup failed, code errno %d\n",
(int)scode);
- printf( "GLOBAL_CLEANUP\n" );
+ printf("GLOBAL_CLEANUP\n");
curl_global_cleanup();
return res;
diff --git a/tests/libtest/lib507.c b/tests/libtest/lib507.c
index 87c21def..74879929 100644
--- a/tests/libtest/lib507.c
+++ b/tests/libtest/lib507.c
@@ -9,7 +9,7 @@
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib508.c b/tests/libtest/lib508.c
index 7f373092..cb60ce1b 100644
--- a/tests/libtest/lib508.c
+++ b/tests/libtest/lib508.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -57,12 +57,12 @@ int test(char *URL)
pooh.readptr = data;
pooh.sizeleft = strlen(data);
- if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
+ if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
fprintf(stderr, "curl_global_init() failed\n");
return TEST_ERR_MAJOR_BAD;
}
- if ((curl = curl_easy_init()) == NULL) {
+ if((curl = curl_easy_init()) == NULL) {
fprintf(stderr, "curl_easy_init() failed\n");
curl_global_cleanup();
return TEST_ERR_MAJOR_BAD;
diff --git a/tests/libtest/lib509.c b/tests/libtest/lib509.c
index a3de51e9..085a9753 100644
--- a/tests/libtest/lib509.c
+++ b/tests/libtest/lib509.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -117,12 +117,12 @@ int test(char *URL)
custom_realloc,
custom_strdup,
custom_calloc);
- if (res != CURLE_OK) {
+ if(res != CURLE_OK) {
fprintf(stderr, "curl_global_init_mem() failed\n");
return TEST_ERR_MAJOR_BAD;
}
- if ((curl = curl_easy_init()) == NULL) {
+ if((curl = curl_easy_init()) == NULL) {
fprintf(stderr, "curl_easy_init() failed\n");
curl_global_cleanup();
return TEST_ERR_MAJOR_BAD;
diff --git a/tests/libtest/lib510.c b/tests/libtest/lib510.c
index c60b2caf..cb5296ec 100644
--- a/tests/libtest/lib510.c
+++ b/tests/libtest/lib510.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -63,19 +63,19 @@ int test(char *URL)
struct WriteThis pooh;
pooh.counter = 0;
- if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
+ if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
fprintf(stderr, "curl_global_init() failed\n");
return TEST_ERR_MAJOR_BAD;
}
- if ((curl = curl_easy_init()) == NULL) {
+ if((curl = curl_easy_init()) == NULL) {
fprintf(stderr, "curl_easy_init() failed\n");
curl_global_cleanup();
return TEST_ERR_MAJOR_BAD;
}
slist = curl_slist_append(slist, "Transfer-Encoding: chunked");
- if (slist == NULL) {
+ if(slist == NULL) {
fprintf(stderr, "curl_slist_append() failed\n");
curl_easy_cleanup(curl);
curl_global_cleanup();
diff --git a/tests/libtest/lib511.c b/tests/libtest/lib511.c
index 6be2d2f7..0b7ae6f4 100644
--- a/tests/libtest/lib511.c
+++ b/tests/libtest/lib511.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -28,12 +28,12 @@ int test(char *URL)
CURLcode res;
CURL *curl;
- if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
+ if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
fprintf(stderr, "curl_global_init() failed\n");
return TEST_ERR_MAJOR_BAD;
}
- if ((curl = curl_easy_init()) == NULL) {
+ if((curl = curl_easy_init()) == NULL) {
fprintf(stderr, "curl_easy_init() failed\n");
curl_global_cleanup();
return TEST_ERR_MAJOR_BAD;
diff --git a/tests/libtest/lib512.c b/tests/libtest/lib512.c
index 19da18b4..14241dd0 100644
--- a/tests/libtest/lib512.c
+++ b/tests/libtest/lib512.c
@@ -9,7 +9,7 @@
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib513.c b/tests/libtest/lib513.c
index 7aab3b1c..58091ef6 100644
--- a/tests/libtest/lib513.c
+++ b/tests/libtest/lib513.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -37,12 +37,12 @@ int test(char *URL)
CURL *curl;
CURLcode res=CURLE_OK;
- if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
+ if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
fprintf(stderr, "curl_global_init() failed\n");
return TEST_ERR_MAJOR_BAD;
}
- if ((curl = curl_easy_init()) == NULL) {
+ if((curl = curl_easy_init()) == NULL) {
fprintf(stderr, "curl_easy_init() failed\n");
curl_global_cleanup();
return TEST_ERR_MAJOR_BAD;
diff --git a/tests/libtest/lib514.c b/tests/libtest/lib514.c
index 953e90df..f516d094 100644
--- a/tests/libtest/lib514.c
+++ b/tests/libtest/lib514.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -28,12 +28,12 @@ int test(char *URL)
CURL *curl;
CURLcode res=CURLE_OK;
- if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
+ if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
fprintf(stderr, "curl_global_init() failed\n");
return TEST_ERR_MAJOR_BAD;
}
- if ((curl = curl_easy_init()) == NULL) {
+ if((curl = curl_easy_init()) == NULL) {
fprintf(stderr, "curl_easy_init() failed\n");
curl_global_cleanup();
return TEST_ERR_MAJOR_BAD;
diff --git a/tests/libtest/lib515.c b/tests/libtest/lib515.c
index 4e96c4a8..d3e6e446 100644
--- a/tests/libtest/lib515.c
+++ b/tests/libtest/lib515.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -28,12 +28,12 @@ int test(char *URL)
CURL *curl;
CURLcode res=CURLE_OK;
- if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
+ if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
fprintf(stderr, "curl_global_init() failed\n");
return TEST_ERR_MAJOR_BAD;
}
- if ((curl = curl_easy_init()) == NULL) {
+ if((curl = curl_easy_init()) == NULL) {
fprintf(stderr, "curl_easy_init() failed\n");
curl_global_cleanup();
return TEST_ERR_MAJOR_BAD;
diff --git a/tests/libtest/lib516.c b/tests/libtest/lib516.c
index a9590948..9faf262c 100644
--- a/tests/libtest/lib516.c
+++ b/tests/libtest/lib516.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -28,12 +28,12 @@ int test(char *URL)
CURL *curl;
CURLcode res=CURLE_OK;
- if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
+ if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
fprintf(stderr, "curl_global_init() failed\n");
return TEST_ERR_MAJOR_BAD;
}
- if ((curl = curl_easy_init()) == NULL) {
+ if((curl = curl_easy_init()) == NULL) {
fprintf(stderr, "curl_easy_init() failed\n");
curl_global_cleanup();
return TEST_ERR_MAJOR_BAD;
diff --git a/tests/libtest/lib517.c b/tests/libtest/lib517.c
index ba49ec41..2f68ebd2 100644
--- a/tests/libtest/lib517.c
+++ b/tests/libtest/lib517.c
@@ -9,7 +9,7 @@
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib518.c b/tests/libtest/lib518.c
index 23f7f17c..e37a7771 100644
--- a/tests/libtest/lib518.c
+++ b/tests/libtest/lib518.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -56,18 +56,19 @@ static char msgbuff[256];
static void store_errmsg(const char *msg, int err)
{
- if (!err)
- sprintf(msgbuff, "%s", msg);
+ if(!err)
+ snprintf(msgbuff, sizeof(msgbuff), "%s", msg);
else
- sprintf(msgbuff, "%s, errno %d, %s", msg, err, strerror(err));
+ snprintf(msgbuff, sizeof(msgbuff), "%s, errno %d, %s", msg,
+ err, strerror(err));
}
static void close_file_descriptors(void)
{
- for (num_open.rlim_cur = 0;
- num_open.rlim_cur < num_open.rlim_max;
- num_open.rlim_cur++)
- if (fd[num_open.rlim_cur] > 0)
+ for(num_open.rlim_cur = 0;
+ num_open.rlim_cur < num_open.rlim_max;
+ num_open.rlim_cur++)
+ if(fd[num_open.rlim_cur] > 0)
close(fd[num_open.rlim_cur]);
free(fd);
fd = NULL;
@@ -79,20 +80,20 @@ static int fopen_works(void)
int i;
int ret = 1;
- for (i = 0; i < 3; i++) {
+ for(i = 0; i < 3; i++) {
fpa[i] = NULL;
}
- for (i = 0; i < 3; i++) {
- fpa[i] = fopen(DEV_NULL, "r");
- if (fpa[i] == NULL) {
- store_errmsg("fopen() failed", ERRNO);
+ for(i = 0; i < 3; i++) {
+ fpa[i] = fopen(DEV_NULL, FOPEN_READTEXT);
+ if(fpa[i] == NULL) {
+ store_errmsg("fopen failed", ERRNO);
fprintf(stderr, "%s\n", msgbuff);
ret = 0;
break;
}
}
- for (i = 0; i < 3; i++) {
- if (fpa[i] != NULL)
+ for(i = 0; i < 3; i++) {
+ if(fpa[i] != NULL)
fclose(fpa[i]);
}
return ret;
@@ -112,7 +113,7 @@ static int rlimit(int keep_open)
#ifdef HAVE_LONGLONG
char fmt_llu[] = "%llu";
- if (sizeof(rl.rlim_max) > sizeof(long))
+ if(sizeof(rl.rlim_max) > sizeof(long))
fmt = fmt_llu;
else
#endif
@@ -120,7 +121,7 @@ static int rlimit(int keep_open)
/* get initial open file limits */
- if (getrlimit(RLIMIT_NOFILE, &rl) != 0) {
+ if(getrlimit(RLIMIT_NOFILE, &rl) != 0) {
store_errmsg("getrlimit() failed", ERRNO);
fprintf(stderr, "%s\n", msgbuff);
return -1;
@@ -129,19 +130,19 @@ static int rlimit(int keep_open)
/* show initial open file limits */
#ifdef RLIM_INFINITY
- if (rl.rlim_cur == RLIM_INFINITY)
+ if(rl.rlim_cur == RLIM_INFINITY)
strcpy(strbuff, "INFINITY");
else
#endif
- sprintf(strbuff, fmt, rl.rlim_cur);
+ snprintf(strbuff, sizeof(strbuff), fmt, rl.rlim_cur);
fprintf(stderr, "initial soft limit: %s\n", strbuff);
#ifdef RLIM_INFINITY
- if (rl.rlim_max == RLIM_INFINITY)
+ if(rl.rlim_max == RLIM_INFINITY)
strcpy(strbuff, "INFINITY");
else
#endif
- sprintf(strbuff, fmt, rl.rlim_max);
+ snprintf(strbuff, sizeof(strbuff), fmt, rl.rlim_max);
fprintf(stderr, "initial hard limit: %s\n", strbuff);
/* show our constants */
@@ -159,14 +160,14 @@ static int rlimit(int keep_open)
* open more than soft limit file descriptors will fail.
*/
- if (rl.rlim_cur != rl.rlim_max) {
+ if(rl.rlim_cur != rl.rlim_max) {
#ifdef OPEN_MAX
- if ((rl.rlim_cur > 0) &&
- (rl.rlim_cur < OPEN_MAX)) {
+ if((rl.rlim_cur > 0) &&
+ (rl.rlim_cur < OPEN_MAX)) {
fprintf(stderr, "raising soft limit up to OPEN_MAX\n");
rl.rlim_cur = OPEN_MAX;
- if (setrlimit(RLIMIT_NOFILE, &rl) != 0) {
+ if(setrlimit(RLIMIT_NOFILE, &rl) != 0) {
/* on failure don't abort just issue a warning */
store_errmsg("setrlimit() failed", ERRNO);
fprintf(stderr, "%s\n", msgbuff);
@@ -177,7 +178,7 @@ static int rlimit(int keep_open)
fprintf(stderr, "raising soft limit up to hard limit\n");
rl.rlim_cur = rl.rlim_max;
- if (setrlimit(RLIMIT_NOFILE, &rl) != 0) {
+ if(setrlimit(RLIMIT_NOFILE, &rl) != 0) {
/* on failure don't abort just issue a warning */
store_errmsg("setrlimit() failed", ERRNO);
fprintf(stderr, "%s\n", msgbuff);
@@ -186,7 +187,7 @@ static int rlimit(int keep_open)
/* get current open file limits */
- if (getrlimit(RLIMIT_NOFILE, &rl) != 0) {
+ if(getrlimit(RLIMIT_NOFILE, &rl) != 0) {
store_errmsg("getrlimit() failed", ERRNO);
fprintf(stderr, "%s\n", msgbuff);
return -3;
@@ -195,19 +196,19 @@ static int rlimit(int keep_open)
/* show current open file limits */
#ifdef RLIM_INFINITY
- if (rl.rlim_cur == RLIM_INFINITY)
+ if(rl.rlim_cur == RLIM_INFINITY)
strcpy(strbuff, "INFINITY");
else
#endif
- sprintf(strbuff, fmt, rl.rlim_cur);
+ snprintf(strbuff, sizeof(strbuff), fmt, rl.rlim_cur);
fprintf(stderr, "current soft limit: %s\n", strbuff);
#ifdef RLIM_INFINITY
- if (rl.rlim_max == RLIM_INFINITY)
+ if(rl.rlim_max == RLIM_INFINITY)
strcpy(strbuff, "INFINITY");
else
#endif
- sprintf(strbuff, fmt, rl.rlim_max);
+ snprintf(strbuff, sizeof(strbuff), fmt, rl.rlim_max);
fprintf(stderr, "current hard limit: %s\n", strbuff);
} /* (rl.rlim_cur != rl.rlim_max) */
@@ -229,15 +230,15 @@ static int rlimit(int keep_open)
num_open.rlim_cur = NUM_NEEDED;
- if ((rl.rlim_cur > 0) &&
+ if((rl.rlim_cur > 0) &&
#ifdef RLIM_INFINITY
(rl.rlim_cur != RLIM_INFINITY) &&
#endif
(rl.rlim_cur <= num_open.rlim_cur)) {
- sprintf(strbuff2, fmt, rl.rlim_cur);
- sprintf(strbuff1, fmt, num_open.rlim_cur);
- sprintf(strbuff, "fds needed %s > system limit %s",
- strbuff1, strbuff2);
+ snprintf(strbuff2, sizeof(strbuff2), fmt, rl.rlim_cur);
+ snprintf(strbuff1, sizeof(strbuff1), fmt, num_open.rlim_cur);
+ snprintf(strbuff, sizeof(strbuff), "fds needed %s > system limit %s",
+ strbuff1, strbuff2);
store_errmsg(strbuff, 0);
fprintf(stderr, "%s\n", msgbuff);
return -4;
@@ -252,21 +253,21 @@ static int rlimit(int keep_open)
* that it becomes available to the test.
*/
- for (nitems = i = 1; nitems <= i; i *= 2)
+ for(nitems = i = 1; nitems <= i; i *= 2)
nitems = i;
- if (nitems > 0x7fff)
+ if(nitems > 0x7fff)
nitems = 0x40000;
do {
num_open.rlim_max = sizeof(*memchunk) * (size_t)nitems;
- sprintf(strbuff, fmt, num_open.rlim_max);
+ snprintf(strbuff, sizeof(strbuff), fmt, num_open.rlim_max);
fprintf(stderr, "allocating memchunk %s byte array\n", strbuff);
memchunk = malloc(sizeof(*memchunk) * (size_t)nitems);
- if (!memchunk) {
+ if(!memchunk) {
fprintf(stderr, "memchunk, malloc() failed\n");
nitems /= 2;
}
- } while (nitems && !memchunk);
- if (!memchunk) {
+ } while(nitems && !memchunk);
+ if(!memchunk) {
store_errmsg("memchunk, malloc() failed", ERRNO);
fprintf(stderr, "%s\n", msgbuff);
return -5;
@@ -276,7 +277,7 @@ static int rlimit(int keep_open)
fprintf(stderr, "initializing memchunk array\n");
- for (i = 0; i < nitems; i++)
+ for(i = 0; i < nitems; i++)
memchunk[i] = -1;
/* set the number of file descriptors we will try to open */
@@ -285,10 +286,10 @@ static int rlimit(int keep_open)
/* verify that we won't overflow size_t in malloc() */
- if ((size_t)(num_open.rlim_max) > ((size_t)-1) / sizeof(*fd)) {
- sprintf(strbuff1, fmt, num_open.rlim_max);
- sprintf(strbuff, "unable to allocate an array for %s "
- "file descriptors, would overflow size_t", strbuff1);
+ if((size_t)(num_open.rlim_max) > ((size_t)-1) / sizeof(*fd)) {
+ snprintf(strbuff1, sizeof(strbuff1), fmt, num_open.rlim_max);
+ snprintf(strbuff, sizeof(strbuff), "unable to allocate an array for %s "
+ "file descriptors, would overflow size_t", strbuff1);
store_errmsg(strbuff, 0);
fprintf(stderr, "%s\n", msgbuff);
free(memchunk);
@@ -297,11 +298,11 @@ static int rlimit(int keep_open)
/* allocate array for file descriptors */
- sprintf(strbuff, fmt, num_open.rlim_max);
+ snprintf(strbuff, sizeof(strbuff), fmt, num_open.rlim_max);
fprintf(stderr, "allocating array for %s file descriptors\n", strbuff);
fd = malloc(sizeof(*fd) * (size_t)(num_open.rlim_max));
- if (!fd) {
+ if(!fd) {
store_errmsg("fd, malloc() failed", ERRNO);
fprintf(stderr, "%s\n", msgbuff);
free(memchunk);
@@ -312,19 +313,19 @@ static int rlimit(int keep_open)
fprintf(stderr, "initializing fd array\n");
- for (num_open.rlim_cur = 0;
- num_open.rlim_cur < num_open.rlim_max;
- num_open.rlim_cur++)
+ for(num_open.rlim_cur = 0;
+ num_open.rlim_cur < num_open.rlim_max;
+ num_open.rlim_cur++)
fd[num_open.rlim_cur] = -1;
- sprintf(strbuff, fmt, num_open.rlim_max);
+ snprintf(strbuff, sizeof(strbuff), fmt, num_open.rlim_max);
fprintf(stderr, "trying to open %s file descriptors\n", strbuff);
/* open a dummy descriptor */
fd[0] = open(DEV_NULL, O_RDONLY);
- if (fd[0] < 0) {
- sprintf(strbuff, "opening of %s failed", DEV_NULL);
+ if(fd[0] < 0) {
+ snprintf(strbuff, sizeof(strbuff), "opening of %s failed", DEV_NULL);
store_errmsg(strbuff, ERRNO);
fprintf(stderr, "%s\n", msgbuff);
free(fd);
@@ -335,36 +336,37 @@ static int rlimit(int keep_open)
/* create a bunch of file descriptors */
- for (num_open.rlim_cur = 1;
- num_open.rlim_cur < num_open.rlim_max;
- num_open.rlim_cur++) {
+ for(num_open.rlim_cur = 1;
+ num_open.rlim_cur < num_open.rlim_max;
+ num_open.rlim_cur++) {
fd[num_open.rlim_cur] = dup(fd[0]);
- if (fd[num_open.rlim_cur] < 0) {
+ if(fd[num_open.rlim_cur] < 0) {
fd[num_open.rlim_cur] = -1;
- sprintf(strbuff1, fmt, num_open.rlim_cur);
- sprintf(strbuff, "dup() attempt %s failed", strbuff1);
+ snprintf(strbuff1, sizeof(strbuff1), fmt, num_open.rlim_cur);
+ snprintf(strbuff, sizeof(strbuff), "dup() attempt %s failed", strbuff1);
fprintf(stderr, "%s\n", strbuff);
- sprintf(strbuff1, fmt, num_open.rlim_cur);
- sprintf(strbuff, "fds system limit seems close to %s", strbuff1);
+ snprintf(strbuff1, sizeof(strbuff), fmt, num_open.rlim_cur);
+ snprintf(strbuff, sizeof(strbuff), "fds system limit seems close to %s",
+ strbuff1);
fprintf(stderr, "%s\n", strbuff);
num_open.rlim_max = NUM_NEEDED;
- sprintf(strbuff2, fmt, num_open.rlim_max);
- sprintf(strbuff1, fmt, num_open.rlim_cur);
- sprintf(strbuff, "fds needed %s > system limit %s",
- strbuff2, strbuff1);
+ snprintf(strbuff2, sizeof(strbuff2), fmt, num_open.rlim_max);
+ snprintf(strbuff1, sizeof(strbuff1), fmt, num_open.rlim_cur);
+ snprintf(strbuff, sizeof(strbuff), "fds needed %s > system limit %s",
+ strbuff2, strbuff1);
store_errmsg(strbuff, 0);
fprintf(stderr, "%s\n", msgbuff);
- for (num_open.rlim_cur = 0;
- fd[num_open.rlim_cur] >= 0;
- num_open.rlim_cur++)
+ for(num_open.rlim_cur = 0;
+ fd[num_open.rlim_cur] >= 0;
+ num_open.rlim_cur++)
close(fd[num_open.rlim_cur]);
free(fd);
fd = NULL;
@@ -375,7 +377,7 @@ static int rlimit(int keep_open)
}
- sprintf(strbuff, fmt, num_open.rlim_max);
+ snprintf(strbuff, sizeof(strbuff), fmt, num_open.rlim_max);
fprintf(stderr, "%s file descriptors open\n", strbuff);
#if !defined(HAVE_POLL_FINE) && \
@@ -394,8 +396,9 @@ static int rlimit(int keep_open)
*/
num_open.rlim_cur = FD_SETSIZE - SAFETY_MARGIN;
- if (num_open.rlim_max > num_open.rlim_cur) {
- sprintf(strbuff, "select limit is FD_SETSIZE %d", FD_SETSIZE);
+ if(num_open.rlim_max > num_open.rlim_cur) {
+ snprintf(strbuff, sizeof(strbuff), "select limit is FD_SETSIZE %d",
+ FD_SETSIZE);
store_errmsg(strbuff, 0);
fprintf(stderr, "%s\n", msgbuff);
close_file_descriptors();
@@ -404,12 +407,13 @@ static int rlimit(int keep_open)
}
num_open.rlim_cur = FD_SETSIZE - SAFETY_MARGIN;
- for (rl.rlim_cur = 0;
- rl.rlim_cur < num_open.rlim_max;
- rl.rlim_cur++) {
- if ((fd[rl.rlim_cur] > 0) &&
+ for(rl.rlim_cur = 0;
+ rl.rlim_cur < num_open.rlim_max;
+ rl.rlim_cur++) {
+ if((fd[rl.rlim_cur] > 0) &&
((unsigned int)fd[rl.rlim_cur] > num_open.rlim_cur)) {
- sprintf(strbuff, "select limit is FD_SETSIZE %d", FD_SETSIZE);
+ snprintf(strbuff, sizeof(strbuff), "select limit is FD_SETSIZE %d",
+ FD_SETSIZE);
store_errmsg(strbuff, 0);
fprintf(stderr, "%s\n", msgbuff);
close_file_descriptors();
@@ -429,12 +433,14 @@ static int rlimit(int keep_open)
* if it is capable of fopen()ing some additional files.
*/
- if (!fopen_works()) {
- sprintf(strbuff1, fmt, num_open.rlim_max);
- sprintf(strbuff, "stdio fopen() fails with %s fds open()",
- strbuff1);
+ if(!fopen_works()) {
+ snprintf(strbuff1, sizeof(strbuff1), fmt, num_open.rlim_max);
+ snprintf(strbuff, sizeof(strbuff),
+ "fopen fails with %s fds open()",
+ strbuff1);
fprintf(stderr, "%s\n", msgbuff);
- sprintf(strbuff, "stdio fopen() fails with lots of fds open()");
+ snprintf(strbuff, sizeof(strbuff),
+ "fopen fails with lots of fds open()");
store_errmsg(strbuff, 0);
close_file_descriptors();
free(memchunk);
@@ -448,7 +454,7 @@ static int rlimit(int keep_open)
/* close file descriptors unless instructed to keep them */
- if (!keep_open) {
+ if(!keep_open) {
close_file_descriptors();
}
@@ -469,7 +475,7 @@ int test(char *URL)
return 0; /* sure, run this! */
}
- if (rlimit(TRUE)) {
+ if(rlimit(TRUE)) {
/* failure */
return TEST_ERR_MAJOR_BAD;
}
@@ -477,13 +483,13 @@ int test(char *URL)
/* run the test with the bunch of open file descriptors
and close them all once the test is over */
- if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
+ if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
fprintf(stderr, "curl_global_init() failed\n");
close_file_descriptors();
return TEST_ERR_MAJOR_BAD;
}
- if ((curl = curl_easy_init()) == NULL) {
+ if((curl = curl_easy_init()) == NULL) {
fprintf(stderr, "curl_easy_init() failed\n");
close_file_descriptors();
curl_global_cleanup();
diff --git a/tests/libtest/lib519.c b/tests/libtest/lib519.c
index b720c8fe..6e305989 100644
--- a/tests/libtest/lib519.c
+++ b/tests/libtest/lib519.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -28,12 +28,12 @@ int test(char *URL)
CURLcode res;
CURL *curl;
- if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
+ if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
fprintf(stderr, "curl_global_init() failed\n");
return TEST_ERR_MAJOR_BAD;
}
- if ((curl = curl_easy_init()) == NULL) {
+ if((curl = curl_easy_init()) == NULL) {
fprintf(stderr, "curl_easy_init() failed\n");
curl_global_cleanup();
return TEST_ERR_MAJOR_BAD;
diff --git a/tests/libtest/lib520.c b/tests/libtest/lib520.c
index 9ffaa4f9..b5a71da2 100644
--- a/tests/libtest/lib520.c
+++ b/tests/libtest/lib520.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -28,12 +28,12 @@ int test(char *URL)
CURLcode res;
CURL *curl;
- if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
+ if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
fprintf(stderr, "curl_global_init() failed\n");
return TEST_ERR_MAJOR_BAD;
}
- if ((curl = curl_easy_init()) == NULL) {
+ if((curl = curl_easy_init()) == NULL) {
fprintf(stderr, "curl_easy_init() failed\n");
curl_global_cleanup();
return TEST_ERR_MAJOR_BAD;
diff --git a/tests/libtest/lib521.c b/tests/libtest/lib521.c
index 93c30686..40f4def4 100644
--- a/tests/libtest/lib521.c
+++ b/tests/libtest/lib521.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -28,12 +28,12 @@ int test(char *URL)
CURLcode res;
CURL *curl;
- if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
+ if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
fprintf(stderr, "curl_global_init() failed\n");
return TEST_ERR_MAJOR_BAD;
}
- if ((curl = curl_easy_init()) == NULL) {
+ if((curl = curl_easy_init()) == NULL) {
fprintf(stderr, "curl_easy_init() failed\n");
curl_global_cleanup();
return TEST_ERR_MAJOR_BAD;
diff --git a/tests/libtest/lib523.c b/tests/libtest/lib523.c
index 0fdc83db..f3264690 100644
--- a/tests/libtest/lib523.c
+++ b/tests/libtest/lib523.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -28,12 +28,12 @@ int test(char *URL)
CURLcode res;
CURL *curl;
- if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
+ if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
fprintf(stderr, "curl_global_init() failed\n");
return TEST_ERR_MAJOR_BAD;
}
- if ((curl = curl_easy_init()) == NULL) {
+ if((curl = curl_easy_init()) == NULL) {
fprintf(stderr, "curl_easy_init() failed\n");
curl_global_cleanup();
return TEST_ERR_MAJOR_BAD;
diff --git a/tests/libtest/lib524.c b/tests/libtest/lib524.c
index 6f56df9b..3440562b 100644
--- a/tests/libtest/lib524.c
+++ b/tests/libtest/lib524.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -28,12 +28,12 @@ int test(char *URL)
CURLcode res;
CURL *curl;
- if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
+ if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
fprintf(stderr, "curl_global_init() failed\n");
return TEST_ERR_MAJOR_BAD;
}
- if ((curl = curl_easy_init()) == NULL) {
+ if((curl = curl_easy_init()) == NULL) {
fprintf(stderr, "curl_easy_init() failed\n");
curl_global_cleanup();
return TEST_ERR_MAJOR_BAD;
diff --git a/tests/libtest/lib525.c b/tests/libtest/lib525.c
index ca128cb9..4bf259d2 100644
--- a/tests/libtest/lib525.c
+++ b/tests/libtest/lib525.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -34,7 +34,7 @@ int test(char *URL)
int res = 0;
CURL *curl = NULL;
FILE *hd_src = NULL;
- int hd ;
+ int hd;
int error;
struct_stat file_info;
CURLM *m = NULL;
@@ -56,7 +56,7 @@ int test(char *URL)
hd_src = fopen(libtest_arg2, "rb");
if(NULL == hd_src) {
error = ERRNO;
- fprintf(stderr, "fopen() failed with error: %d (%s)\n",
+ fprintf(stderr, "fopen failed with error: %d (%s)\n",
error, strerror(error));
fprintf(stderr, "Error opening file: (%s)\n", libtest_arg2);
return TEST_ERR_FOPEN;
@@ -86,7 +86,7 @@ int test(char *URL)
easy_setopt(curl, CURLOPT_UPLOAD, 1L);
/* specify target */
- easy_setopt(curl,CURLOPT_URL, URL);
+ easy_setopt(curl, CURLOPT_URL, URL);
/* go verbose */
easy_setopt(curl, CURLOPT_VERBOSE, 1L);
diff --git a/tests/libtest/lib526.c b/tests/libtest/lib526.c
index 9db04dba..0ce7ebbe 100644
--- a/tests/libtest/lib526.c
+++ b/tests/libtest/lib526.c
@@ -9,7 +9,7 @@
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib530.c b/tests/libtest/lib530.c
index e60d1172..82bfab36 100644
--- a/tests/libtest/lib530.c
+++ b/tests/libtest/lib530.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -53,7 +53,7 @@ int test(char *URL)
/* get an easy handle */
easy_init(curl[i]);
/* specify target */
- sprintf(target_url, "%s%04i", URL, i + 1);
+ snprintf(target_url, sizeof(target_url), "%s%04i", URL, i + 1);
target_url[sizeof(target_url) - 1] = '\0';
easy_setopt(curl[i], CURLOPT_URL, target_url);
/* go verbose */
diff --git a/tests/libtest/lib533.c b/tests/libtest/lib533.c
index fdc18a1e..706b269f 100644
--- a/tests/libtest/lib533.c
+++ b/tests/libtest/lib533.c
@@ -9,7 +9,7 @@
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib536.c b/tests/libtest/lib536.c
index e3ae402b..f3ba5734 100644
--- a/tests/libtest/lib536.c
+++ b/tests/libtest/lib536.c
@@ -9,7 +9,7 @@
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib537.c b/tests/libtest/lib537.c
index 5da53799..c1561419 100644
--- a/tests/libtest/lib537.c
+++ b/tests/libtest/lib537.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -57,18 +57,19 @@ static char msgbuff[256];
static void store_errmsg(const char *msg, int err)
{
- if (!err)
- sprintf(msgbuff, "%s", msg);
+ if(!err)
+ snprintf(msgbuff, sizeof(msgbuff), "%s", msg);
else
- sprintf(msgbuff, "%s, errno %d, %s", msg, err, strerror(err));
+ snprintf(msgbuff, sizeof(msgbuff), "%s, errno %d, %s", msg, err,
+ strerror(err));
}
static void close_file_descriptors(void)
{
- for (num_open.rlim_cur = 0;
- num_open.rlim_cur < num_open.rlim_max;
- num_open.rlim_cur++)
- if (fd[num_open.rlim_cur] > 0)
+ for(num_open.rlim_cur = 0;
+ num_open.rlim_cur < num_open.rlim_max;
+ num_open.rlim_cur++)
+ if(fd[num_open.rlim_cur] > 0)
close(fd[num_open.rlim_cur]);
free(fd);
fd = NULL;
@@ -80,20 +81,20 @@ static int fopen_works(void)
int i;
int ret = 1;
- for (i = 0; i < 3; i++) {
+ for(i = 0; i < 3; i++) {
fpa[i] = NULL;
}
- for (i = 0; i < 3; i++) {
- fpa[i] = fopen(DEV_NULL, "r");
- if (fpa[i] == NULL) {
- store_errmsg("fopen() failed", ERRNO);
+ for(i = 0; i < 3; i++) {
+ fpa[i] = fopen(DEV_NULL, FOPEN_READTEXT);
+ if(fpa[i] == NULL) {
+ store_errmsg("fopen failed", ERRNO);
fprintf(stderr, "%s\n", msgbuff);
ret = 0;
break;
}
}
- for (i = 0; i < 3; i++) {
- if (fpa[i] != NULL)
+ for(i = 0; i < 3; i++) {
+ if(fpa[i] != NULL)
fclose(fpa[i]);
}
return ret;
@@ -113,7 +114,7 @@ static int rlimit(int keep_open)
#ifdef HAVE_LONGLONG
char fmt_llu[] = "%llu";
- if (sizeof(rl.rlim_max) > sizeof(long))
+ if(sizeof(rl.rlim_max) > sizeof(long))
fmt = fmt_llu;
else
#endif
@@ -121,7 +122,7 @@ static int rlimit(int keep_open)
/* get initial open file limits */
- if (getrlimit(RLIMIT_NOFILE, &rl) != 0) {
+ if(getrlimit(RLIMIT_NOFILE, &rl) != 0) {
store_errmsg("getrlimit() failed", ERRNO);
fprintf(stderr, "%s\n", msgbuff);
return -1;
@@ -130,19 +131,19 @@ static int rlimit(int keep_open)
/* show initial open file limits */
#ifdef RLIM_INFINITY
- if (rl.rlim_cur == RLIM_INFINITY)
+ if(rl.rlim_cur == RLIM_INFINITY)
strcpy(strbuff, "INFINITY");
else
#endif
- sprintf(strbuff, fmt, rl.rlim_cur);
+ snprintf(strbuff, sizeof(strbuff), fmt, rl.rlim_cur);
fprintf(stderr, "initial soft limit: %s\n", strbuff);
#ifdef RLIM_INFINITY
- if (rl.rlim_max == RLIM_INFINITY)
+ if(rl.rlim_max == RLIM_INFINITY)
strcpy(strbuff, "INFINITY");
else
#endif
- sprintf(strbuff, fmt, rl.rlim_max);
+ snprintf(strbuff, sizeof(strbuff), fmt, rl.rlim_max);
fprintf(stderr, "initial hard limit: %s\n", strbuff);
/*
@@ -154,14 +155,14 @@ static int rlimit(int keep_open)
* open more than soft limit file descriptors will fail.
*/
- if (rl.rlim_cur != rl.rlim_max) {
+ if(rl.rlim_cur != rl.rlim_max) {
#ifdef OPEN_MAX
- if ((rl.rlim_cur > 0) &&
+ if((rl.rlim_cur > 0) &&
(rl.rlim_cur < OPEN_MAX)) {
fprintf(stderr, "raising soft limit up to OPEN_MAX\n");
rl.rlim_cur = OPEN_MAX;
- if (setrlimit(RLIMIT_NOFILE, &rl) != 0) {
+ if(setrlimit(RLIMIT_NOFILE, &rl) != 0) {
/* on failure don't abort just issue a warning */
store_errmsg("setrlimit() failed", ERRNO);
fprintf(stderr, "%s\n", msgbuff);
@@ -172,7 +173,7 @@ static int rlimit(int keep_open)
fprintf(stderr, "raising soft limit up to hard limit\n");
rl.rlim_cur = rl.rlim_max;
- if (setrlimit(RLIMIT_NOFILE, &rl) != 0) {
+ if(setrlimit(RLIMIT_NOFILE, &rl) != 0) {
/* on failure don't abort just issue a warning */
store_errmsg("setrlimit() failed", ERRNO);
fprintf(stderr, "%s\n", msgbuff);
@@ -181,7 +182,7 @@ static int rlimit(int keep_open)
/* get current open file limits */
- if (getrlimit(RLIMIT_NOFILE, &rl) != 0) {
+ if(getrlimit(RLIMIT_NOFILE, &rl) != 0) {
store_errmsg("getrlimit() failed", ERRNO);
fprintf(stderr, "%s\n", msgbuff);
return -3;
@@ -190,19 +191,19 @@ static int rlimit(int keep_open)
/* show current open file limits */
#ifdef RLIM_INFINITY
- if (rl.rlim_cur == RLIM_INFINITY)
+ if(rl.rlim_cur == RLIM_INFINITY)
strcpy(strbuff, "INFINITY");
else
#endif
- sprintf(strbuff, fmt, rl.rlim_cur);
+ snprintf(strbuff, sizeof(strbuff), fmt, rl.rlim_cur);
fprintf(stderr, "current soft limit: %s\n", strbuff);
#ifdef RLIM_INFINITY
- if (rl.rlim_max == RLIM_INFINITY)
+ if(rl.rlim_max == RLIM_INFINITY)
strcpy(strbuff, "INFINITY");
else
#endif
- sprintf(strbuff, fmt, rl.rlim_max);
+ snprintf(strbuff, sizeof(strbuff), fmt, rl.rlim_max);
fprintf(stderr, "current hard limit: %s\n", strbuff);
} /* (rl.rlim_cur != rl.rlim_max) */
@@ -226,21 +227,21 @@ static int rlimit(int keep_open)
* that it becomes available to the test.
*/
- for (nitems = i = 1; nitems <= i; i *= 2)
+ for(nitems = i = 1; nitems <= i; i *= 2)
nitems = i;
- if (nitems > 0x7fff)
+ if(nitems > 0x7fff)
nitems = 0x40000;
do {
num_open.rlim_max = sizeof(*memchunk) * (size_t)nitems;
- sprintf(strbuff, fmt, num_open.rlim_max);
+ snprintf(strbuff, sizeof(strbuff), fmt, num_open.rlim_max);
fprintf(stderr, "allocating memchunk %s byte array\n", strbuff);
memchunk = malloc(sizeof(*memchunk) * (size_t)nitems);
- if (!memchunk) {
+ if(!memchunk) {
fprintf(stderr, "memchunk, malloc() failed\n");
nitems /= 2;
}
- } while (nitems && !memchunk);
- if (!memchunk) {
+ } while(nitems && !memchunk);
+ if(!memchunk) {
store_errmsg("memchunk, malloc() failed", ERRNO);
fprintf(stderr, "%s\n", msgbuff);
return -4;
@@ -250,34 +251,34 @@ static int rlimit(int keep_open)
fprintf(stderr, "initializing memchunk array\n");
- for (i = 0; i < nitems; i++)
+ for(i = 0; i < nitems; i++)
memchunk[i] = -1;
/* set the number of file descriptors we will try to open */
#ifdef RLIM_INFINITY
- if ((rl.rlim_cur > 0) && (rl.rlim_cur != RLIM_INFINITY)) {
+ if((rl.rlim_cur > 0) && (rl.rlim_cur != RLIM_INFINITY)) {
#else
- if (rl.rlim_cur > 0) {
+ if(rl.rlim_cur > 0) {
#endif
/* soft limit minus SAFETY_MARGIN */
num_open.rlim_max = rl.rlim_cur - SAFETY_MARGIN;
}
else {
/* a huge number of file descriptors */
- for (nitems = i = 1; nitems <= i; i *= 2)
+ for(nitems = i = 1; nitems <= i; i *= 2)
nitems = i;
- if (nitems > 0x7fff)
+ if(nitems > 0x7fff)
nitems = 0x40000;
num_open.rlim_max = nitems;
}
/* verify that we won't overflow size_t in malloc() */
- if ((size_t)(num_open.rlim_max) > ((size_t)-1) / sizeof(*fd)) {
- sprintf(strbuff1, fmt, num_open.rlim_max);
- sprintf(strbuff, "unable to allocate an array for %s "
- "file descriptors, would overflow size_t", strbuff1);
+ if((size_t)(num_open.rlim_max) > ((size_t)-1) / sizeof(*fd)) {
+ snprintf(strbuff1, sizeof(strbuff1), fmt, num_open.rlim_max);
+ snprintf(strbuff, sizeof(strbuff), "unable to allocate an array for %s "
+ "file descriptors, would overflow size_t", strbuff1);
store_errmsg(strbuff, 0);
fprintf(stderr, "%s\n", msgbuff);
free(memchunk);
@@ -287,15 +288,15 @@ static int rlimit(int keep_open)
/* allocate array for file descriptors */
do {
- sprintf(strbuff, fmt, num_open.rlim_max);
+ snprintf(strbuff, sizeof(strbuff), fmt, num_open.rlim_max);
fprintf(stderr, "allocating array for %s file descriptors\n", strbuff);
fd = malloc(sizeof(*fd) * (size_t)(num_open.rlim_max));
- if (!fd) {
+ if(!fd) {
fprintf(stderr, "fd, malloc() failed\n");
num_open.rlim_max /= 2;
}
- } while (num_open.rlim_max && !fd);
- if (!fd) {
+ } while(num_open.rlim_max && !fd);
+ if(!fd) {
store_errmsg("fd, malloc() failed", ERRNO);
fprintf(stderr, "%s\n", msgbuff);
free(memchunk);
@@ -306,19 +307,19 @@ static int rlimit(int keep_open)
fprintf(stderr, "initializing fd array\n");
- for (num_open.rlim_cur = 0;
- num_open.rlim_cur < num_open.rlim_max;
- num_open.rlim_cur++)
+ for(num_open.rlim_cur = 0;
+ num_open.rlim_cur < num_open.rlim_max;
+ num_open.rlim_cur++)
fd[num_open.rlim_cur] = -1;
- sprintf(strbuff, fmt, num_open.rlim_max);
+ snprintf(strbuff, sizeof(strbuff), fmt, num_open.rlim_max);
fprintf(stderr, "trying to open %s file descriptors\n", strbuff);
/* open a dummy descriptor */
fd[0] = open(DEV_NULL, O_RDONLY);
- if (fd[0] < 0) {
- sprintf(strbuff, "opening of %s failed", DEV_NULL);
+ if(fd[0] < 0) {
+ snprintf(strbuff, sizeof(strbuff), "opening of %s failed", DEV_NULL);
store_errmsg(strbuff, ERRNO);
fprintf(stderr, "%s\n", msgbuff);
free(fd);
@@ -329,45 +330,47 @@ static int rlimit(int keep_open)
/* create a bunch of file descriptors */
- for (num_open.rlim_cur = 1;
- num_open.rlim_cur < num_open.rlim_max;
- num_open.rlim_cur++) {
+ for(num_open.rlim_cur = 1;
+ num_open.rlim_cur < num_open.rlim_max;
+ num_open.rlim_cur++) {
fd[num_open.rlim_cur] = dup(fd[0]);
- if (fd[num_open.rlim_cur] < 0) {
+ if(fd[num_open.rlim_cur] < 0) {
fd[num_open.rlim_cur] = -1;
- sprintf(strbuff1, fmt, num_open.rlim_cur);
- sprintf(strbuff, "dup() attempt %s failed", strbuff1);
+ snprintf(strbuff1, sizeof(strbuff1), fmt, num_open.rlim_cur);
+ snprintf(strbuff, sizeof(strbuff), "dup() attempt %s failed", strbuff1);
fprintf(stderr, "%s\n", strbuff);
- sprintf(strbuff1, fmt, num_open.rlim_cur);
- sprintf(strbuff, "fds system limit seems close to %s", strbuff1);
+ snprintf(strbuff1, sizeof(strbuff1), fmt, num_open.rlim_cur);
+ snprintf(strbuff, sizeof(strbuff), "fds system limit seems close to %s",
+ strbuff1);
fprintf(stderr, "%s\n", strbuff);
num_open.rlim_max = num_open.rlim_cur - SAFETY_MARGIN;
num_open.rlim_cur -= num_open.rlim_max;
- sprintf(strbuff1, fmt, num_open.rlim_cur);
- sprintf(strbuff, "closing %s file descriptors", strbuff1);
+ snprintf(strbuff1, sizeof(strbuff1), fmt, num_open.rlim_cur);
+ snprintf(strbuff, sizeof(strbuff), "closing %s file descriptors",
+ strbuff1);
fprintf(stderr, "%s\n", strbuff);
- for (num_open.rlim_cur = num_open.rlim_max;
- fd[num_open.rlim_cur] >= 0;
- num_open.rlim_cur++) {
+ for(num_open.rlim_cur = num_open.rlim_max;
+ fd[num_open.rlim_cur] >= 0;
+ num_open.rlim_cur++) {
close(fd[num_open.rlim_cur]);
fd[num_open.rlim_cur] = -1;
}
- sprintf(strbuff, fmt, num_open.rlim_max);
+ snprintf(strbuff, sizeof(strbuff), fmt, num_open.rlim_max);
fprintf(stderr, "shrinking array for %s file descriptors\n", strbuff);
/* we don't care if we can't shrink it */
tmpfd = realloc(fd, sizeof(*fd) * (size_t)(num_open.rlim_max));
- if (tmpfd) {
+ if(tmpfd) {
fd = tmpfd;
tmpfd = NULL;
}
@@ -378,7 +381,7 @@ static int rlimit(int keep_open)
}
- sprintf(strbuff, fmt, num_open.rlim_max);
+ snprintf(strbuff, sizeof(strbuff), fmt, num_open.rlim_max);
fprintf(stderr, "%s file descriptors open\n", strbuff);
#if !defined(HAVE_POLL_FINE) && \
@@ -397,8 +400,9 @@ static int rlimit(int keep_open)
*/
num_open.rlim_cur = FD_SETSIZE - SAFETY_MARGIN;
- if (num_open.rlim_max > num_open.rlim_cur) {
- sprintf(strbuff, "select limit is FD_SETSIZE %d", FD_SETSIZE);
+ if(num_open.rlim_max > num_open.rlim_cur) {
+ snprintf(strbuff, sizeof(strbuff), "select limit is FD_SETSIZE %d",
+ FD_SETSIZE);
store_errmsg(strbuff, 0);
fprintf(stderr, "%s\n", msgbuff);
close_file_descriptors();
@@ -407,12 +411,13 @@ static int rlimit(int keep_open)
}
num_open.rlim_cur = FD_SETSIZE - SAFETY_MARGIN;
- for (rl.rlim_cur = 0;
- rl.rlim_cur < num_open.rlim_max;
- rl.rlim_cur++) {
- if ((fd[rl.rlim_cur] > 0) &&
+ for(rl.rlim_cur = 0;
+ rl.rlim_cur < num_open.rlim_max;
+ rl.rlim_cur++) {
+ if((fd[rl.rlim_cur] > 0) &&
((unsigned int)fd[rl.rlim_cur] > num_open.rlim_cur)) {
- sprintf(strbuff, "select limit is FD_SETSIZE %d", FD_SETSIZE);
+ snprintf(strbuff, sizeof(strbuff), "select limit is FD_SETSIZE %d",
+ FD_SETSIZE);
store_errmsg(strbuff, 0);
fprintf(stderr, "%s\n", msgbuff);
close_file_descriptors();
@@ -432,12 +437,12 @@ static int rlimit(int keep_open)
* if it is capable of fopen()ing some additional files.
*/
- if (!fopen_works()) {
- sprintf(strbuff1, fmt, num_open.rlim_max);
- sprintf(strbuff, "stdio fopen() fails with %s fds open()",
+ if(!fopen_works()) {
+ snprintf(strbuff1, sizeof(strbuff1), fmt, num_open.rlim_max);
+ snprintf(strbuff, sizeof(strbuff), "fopen fails with %s fds open",
strbuff1);
fprintf(stderr, "%s\n", msgbuff);
- sprintf(strbuff, "stdio fopen() fails with lots of fds open()");
+ snprintf(strbuff, sizeof(strbuff), "fopen fails with lots of fds open");
store_errmsg(strbuff, 0);
close_file_descriptors();
free(memchunk);
@@ -451,7 +456,7 @@ static int rlimit(int keep_open)
/* close file descriptors unless instructed to keep them */
- if (!keep_open) {
+ if(!keep_open) {
close_file_descriptors();
}
@@ -472,7 +477,7 @@ int test(char *URL)
return 0; /* sure, run this! */
}
- if (rlimit(TRUE)) {
+ if(rlimit(TRUE)) {
/* failure */
return TEST_ERR_MAJOR_BAD;
}
@@ -480,13 +485,13 @@ int test(char *URL)
/* run the test with the bunch of open file descriptors
and close them all once the test is over */
- if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
+ if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
fprintf(stderr, "curl_global_init() failed\n");
close_file_descriptors();
return TEST_ERR_MAJOR_BAD;
}
- if ((curl = curl_easy_init()) == NULL) {
+ if((curl = curl_easy_init()) == NULL) {
fprintf(stderr, "curl_easy_init() failed\n");
close_file_descriptors();
curl_global_cleanup();
diff --git a/tests/libtest/lib539.c b/tests/libtest/lib539.c
index 053d2980..9f0f8fab 100644
--- a/tests/libtest/lib539.c
+++ b/tests/libtest/lib539.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -30,12 +30,12 @@ int test(char *URL)
char *newURL = NULL;
struct curl_slist *slist = NULL;
- if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
+ if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
fprintf(stderr, "curl_global_init() failed\n");
return TEST_ERR_MAJOR_BAD;
}
- if ((curl = curl_easy_init()) == NULL) {
+ if((curl = curl_easy_init()) == NULL) {
fprintf(stderr, "curl_easy_init() failed\n");
curl_global_cleanup();
return TEST_ERR_MAJOR_BAD;
@@ -58,16 +58,15 @@ int test(char *URL)
* even though no directories are stored in the ftpconn->dirs array (after a
* call to freedirs).
*/
- newURL = malloc(strlen(URL) + 3);
- if (newURL == NULL) {
+ newURL = aprintf("%s./", URL);
+ if(newURL == NULL) {
curl_easy_cleanup(curl);
curl_global_cleanup();
return TEST_ERR_MAJOR_BAD;
}
- newURL = strcat(strcpy(newURL, URL), "./");
slist = curl_slist_append (NULL, "SYST");
- if (slist == NULL) {
+ if(slist == NULL) {
free(newURL);
curl_easy_cleanup(curl);
curl_global_cleanup();
diff --git a/tests/libtest/lib540.c b/tests/libtest/lib540.c
index ac0ebe60..9b3b5a40 100644
--- a/tests/libtest/lib540.c
+++ b/tests/libtest/lib540.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -113,7 +113,7 @@ static int loop(int num, CURLM *cm, const char* url, const char* userpwd,
if(res)
return res;
- while (U) {
+ while(U) {
int M = -99;
@@ -125,7 +125,7 @@ static int loop(int num, CURLM *cm, const char* url, const char* userpwd,
if(res)
return res;
- if (U) {
+ if(U) {
FD_ZERO(&R);
FD_ZERO(&W);
FD_ZERO(&E);
@@ -200,7 +200,7 @@ int test(char *URL)
if(test_argc < 4)
return 99;
- sprintf(buffer, "Host: %s", HOST);
+ snprintf(buffer, sizeof(buffer), "Host: %s", HOST);
/* now add a custom Host: header */
headers = curl_slist_append(headers, buffer);
diff --git a/tests/libtest/lib541.c b/tests/libtest/lib541.c
index 6015d2f0..604446a2 100644
--- a/tests/libtest/lib541.c
+++ b/tests/libtest/lib541.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -35,12 +35,12 @@ int test(char *URL)
{
CURL *curl;
CURLcode res = CURLE_OK;
- FILE *hd_src ;
+ FILE *hd_src;
int hd;
struct_stat file_info;
int error;
- if (!libtest_arg2) {
+ if(!libtest_arg2) {
fprintf(stderr, "Usage: <url> <file-to-upload>\n");
return TEST_ERR_USAGE;
}
@@ -48,7 +48,7 @@ int test(char *URL)
hd_src = fopen(libtest_arg2, "rb");
if(NULL == hd_src) {
error = ERRNO;
- fprintf(stderr, "fopen() failed with error: %d %s\n",
+ fprintf(stderr, "fopen failed with error: %d %s\n",
error, strerror(error));
fprintf(stderr, "Error opening file: %s\n", libtest_arg2);
return -2; /* if this happens things are major weird */
@@ -72,14 +72,14 @@ int test(char *URL)
return TEST_ERR_MAJOR_BAD;
}
- if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
+ if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
fprintf(stderr, "curl_global_init() failed\n");
fclose(hd_src);
return TEST_ERR_MAJOR_BAD;
}
/* get a curl handle */
- if ((curl = curl_easy_init()) == NULL) {
+ if((curl = curl_easy_init()) == NULL) {
fprintf(stderr, "curl_easy_init() failed\n");
curl_global_cleanup();
fclose(hd_src);
@@ -93,7 +93,7 @@ int test(char *URL)
test_setopt(curl, CURLOPT_VERBOSE, 1L);
/* specify target */
- test_setopt(curl,CURLOPT_URL, URL);
+ test_setopt(curl, CURLOPT_URL, URL);
/* now specify which file to upload */
test_setopt(curl, CURLOPT_READDATA, hd_src);
diff --git a/tests/libtest/lib542.c b/tests/libtest/lib542.c
index 84f493f3..c82ccd5b 100644
--- a/tests/libtest/lib542.c
+++ b/tests/libtest/lib542.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -36,13 +36,13 @@ int test(char *URL)
CURL *curl;
CURLcode res = CURLE_OK;
- if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
+ if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
fprintf(stderr, "curl_global_init() failed\n");
return TEST_ERR_MAJOR_BAD;
}
/* get a curl handle */
- if ((curl = curl_easy_init()) == NULL) {
+ if((curl = curl_easy_init()) == NULL) {
fprintf(stderr, "curl_easy_init() failed\n");
curl_global_cleanup();
return TEST_ERR_MAJOR_BAD;
@@ -58,7 +58,7 @@ int test(char *URL)
test_setopt(curl, CURLOPT_HEADER, 0L);
/* specify target */
- test_setopt(curl,CURLOPT_URL, URL);
+ test_setopt(curl, CURLOPT_URL, URL);
/* Now run off and do what you've been told! */
res = curl_easy_perform(curl);
diff --git a/tests/libtest/lib543.c b/tests/libtest/lib543.c
index b4a31ca9..8fec052d 100644
--- a/tests/libtest/lib543.c
+++ b/tests/libtest/lib543.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -36,7 +36,7 @@ int test(char *URL)
char *s;
(void)URL;
- if ((easy = curl_easy_init()) == NULL) {
+ if((easy = curl_easy_init()) == NULL) {
fprintf(stderr, "curl_easy_init() failed\n");
return TEST_ERR_MAJOR_BAD;
}
diff --git a/tests/libtest/lib544.c b/tests/libtest/lib544.c
index 7e2f7351..4b08a0a7 100644
--- a/tests/libtest/lib544.c
+++ b/tests/libtest/lib544.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -42,12 +42,12 @@ int test(char *URL)
CURL *curl;
CURLcode res=CURLE_OK;
- if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
+ if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
fprintf(stderr, "curl_global_init() failed\n");
return TEST_ERR_MAJOR_BAD;
}
- if ((curl = curl_easy_init()) == NULL) {
+ if((curl = curl_easy_init()) == NULL) {
fprintf(stderr, "curl_easy_init() failed\n");
curl_global_cleanup();
return TEST_ERR_MAJOR_BAD;
diff --git a/tests/libtest/lib547.c b/tests/libtest/lib547.c
index c82bc3f2..4ec42a33 100644
--- a/tests/libtest/lib547.c
+++ b/tests/libtest/lib547.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -85,12 +85,12 @@ int test(char *URL)
int counter=0;
#endif
- if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
+ if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
fprintf(stderr, "curl_global_init() failed\n");
return TEST_ERR_MAJOR_BAD;
}
- if ((curl = curl_easy_init()) == NULL) {
+ if((curl = curl_easy_init()) == NULL) {
fprintf(stderr, "curl_easy_init() failed\n");
curl_global_cleanup();
return TEST_ERR_MAJOR_BAD;
@@ -108,7 +108,8 @@ int test(char *URL)
test_setopt(curl, CURLOPT_IOCTLDATA, &counter);
test_setopt(curl, CURLOPT_READFUNCTION, readcallback);
test_setopt(curl, CURLOPT_READDATA, &counter);
- /* We CANNOT do the POST fine without setting the size (or choose chunked)! */
+ /* We CANNOT do the POST fine without setting the size (or choose
+ chunked)! */
test_setopt(curl, CURLOPT_POSTFIELDSIZE, (long)strlen(UPLOADTHIS));
#endif
test_setopt(curl, CURLOPT_POST, 1L);
diff --git a/tests/libtest/lib549.c b/tests/libtest/lib549.c
index a1568c88..13702954 100644
--- a/tests/libtest/lib549.c
+++ b/tests/libtest/lib549.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -33,12 +33,12 @@ int test(char *URL)
CURLcode res;
CURL *curl;
- if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
+ if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
fprintf(stderr, "curl_global_init() failed\n");
return TEST_ERR_MAJOR_BAD;
}
- if ((curl = curl_easy_init()) == NULL) {
+ if((curl = curl_easy_init()) == NULL) {
fprintf(stderr, "curl_easy_init() failed\n");
curl_global_cleanup();
return TEST_ERR_MAJOR_BAD;
diff --git a/tests/libtest/lib552.c b/tests/libtest/lib552.c
index 2cc942ad..9fe4a716 100644
--- a/tests/libtest/lib552.c
+++ b/tests/libtest/lib552.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -63,14 +63,14 @@ void dump(const char *text,
for(c = 0; (c < width) && (i+c < size); c++) {
/* check for 0D0A; if found, skip past and start a new line of output */
- if (nohex && (i+c+1 < size) && ptr[i+c]==0x0D && ptr[i+c+1]==0x0A) {
+ if(nohex && (i+c+1 < size) && ptr[i+c]==0x0D && ptr[i+c+1]==0x0A) {
i+=(c+2-width);
break;
}
fprintf(stream, "%c",
(ptr[i+c]>=0x20) && (ptr[i+c]<0x80)?ptr[i+c]:'.');
/* check again for 0D0A, to avoid an extra \n if it's at width */
- if (nohex && (i+c+2 < size) && ptr[i+c+1]==0x0D && ptr[i+c+2]==0x0A) {
+ if(nohex && (i+c+2 < size) && ptr[i+c+1]==0x0D && ptr[i+c+2]==0x0A) {
i+=(c+3-width);
break;
}
@@ -121,12 +121,14 @@ int my_trace(CURL *handle, curl_infotype type,
static size_t current_offset = 0;
-static char databuf[70000]; /* MUST be more than 64k OR MAX_INITIAL_POST_SIZE */
+static char databuf[70000]; /* MUST be more than 64k OR
+ MAX_INITIAL_POST_SIZE */
static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *stream)
{
size_t amount = nmemb * size; /* Total bytes curl wants */
- size_t available = sizeof(databuf) - current_offset; /* What we have to give */
+ size_t available = sizeof(databuf) - current_offset; /* What we have to
+ give */
size_t given = amount < available ? amount : available; /* What is given */
(void)stream;
memcpy(ptr, databuf + current_offset, given);
@@ -135,7 +137,8 @@ static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *stream)
}
-static size_t write_callback(void *ptr, size_t size, size_t nmemb, void *stream)
+static size_t write_callback(void *ptr, size_t size, size_t nmemb,
+ void *stream)
{
int amount = curlx_uztosi(size * nmemb);
printf("%.*s", amount, (char *)ptr);
@@ -147,7 +150,7 @@ static size_t write_callback(void *ptr, size_t size, size_t nmemb, void *stream)
static curlioerr ioctl_callback(CURL * handle, int cmd, void *clientp)
{
(void)clientp;
- if (cmd == CURLIOCMD_RESTARTREAD ) {
+ if(cmd == CURLIOCMD_RESTARTREAD) {
printf("APPLICATION: recieved a CURLIOCMD_RESTARTREAD request\n");
printf("APPLICATION: ** REWINDING! **\n");
current_offset = 0;
@@ -181,7 +184,7 @@ int test(char *URL)
test_setopt(curl, CURLOPT_VERBOSE, 1L);
/* setup repeated data string */
- for (i=0; i < sizeof(databuf); ++i)
+ for(i=0; i < sizeof(databuf); ++i)
databuf[i] = fill[i % sizeof fill];
/* Post */
@@ -206,7 +209,8 @@ int test(char *URL)
test_setopt(curl, CURLOPT_URL, URL);
- /* Accept any auth. But for this bug configure proxy with DIGEST, basic might work too, not NTLM */
+ /* Accept any auth. But for this bug configure proxy with DIGEST, basic
+ might work too, not NTLM */
test_setopt(curl, CURLOPT_PROXYAUTH, (long)CURLAUTH_ANY);
res = curl_easy_perform(curl);
diff --git a/tests/libtest/lib553.c b/tests/libtest/lib553.c
index cb1cefd5..9afaad48 100644
--- a/tests/libtest/lib553.c
+++ b/tests/libtest/lib553.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -39,7 +39,7 @@ static size_t myreadfunc(void *ptr, size_t size, size_t nmemb, void *stream)
memset(buf, 'A', sizeof(buf));
size *= nmemb;
- if (size > total)
+ if(size > total)
size = total;
if(size > sizeof(buf))
@@ -73,18 +73,18 @@ int test(char *URL)
return TEST_ERR_MAJOR_BAD;
}
- for (i = 0; i < NUM_HEADERS; i++) {
- int len = sprintf(buf, "Header%d: ", i);
+ for(i = 0; i < NUM_HEADERS; i++) {
+ int len = snprintf(buf, sizeof(buf), "Header%d: ", i);
memset(&buf[len], 'A', SIZE_HEADERS);
buf[len + SIZE_HEADERS]=0; /* zero terminate */
hl = curl_slist_append(headerlist, buf);
- if (!hl)
+ if(!hl)
goto test_cleanup;
headerlist = hl;
}
hl = curl_slist_append(headerlist, "Expect: ");
- if (!hl)
+ if(!hl)
goto test_cleanup;
headerlist = hl;
diff --git a/tests/libtest/lib554.c b/tests/libtest/lib554.c
index c54d99e8..803df26d 100644
--- a/tests/libtest/lib554.c
+++ b/tests/libtest/lib554.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -162,7 +162,7 @@ static int once(char *URL, bool oldstyle)
if(formrc)
printf("curl_formadd(4) = %d\n", (int)formrc);
- if ((curl = curl_easy_init()) == NULL) {
+ if((curl = curl_easy_init()) == NULL) {
fprintf(stderr, "curl_easy_init() failed\n");
curl_formfree(formpost);
curl_global_cleanup();
@@ -208,7 +208,7 @@ int test(char *URL)
{
int res;
- if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
+ if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
fprintf(stderr, "curl_global_init() failed\n");
return TEST_ERR_MAJOR_BAD;
}
diff --git a/tests/libtest/lib555.c b/tests/libtest/lib555.c
index 49a81bf5..e84af87e 100644
--- a/tests/libtest/lib555.c
+++ b/tests/libtest/lib555.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -96,7 +96,8 @@ int test(char *URL)
easy_setopt(curl, CURLOPT_IOCTLDATA, &counter);
easy_setopt(curl, CURLOPT_READFUNCTION, readcallback);
easy_setopt(curl, CURLOPT_READDATA, &counter);
- /* We CANNOT do the POST fine without setting the size (or choose chunked)! */
+ /* We CANNOT do the POST fine without setting the size (or choose
+ chunked)! */
easy_setopt(curl, CURLOPT_POSTFIELDSIZE, strlen(UPLOADTHIS));
easy_setopt(curl, CURLOPT_POST, 1L);
@@ -113,7 +114,7 @@ int test(char *URL)
multi_add_handle(m, curl);
- while (running) {
+ while(running) {
struct timeval timeout;
fd_set fdread, fdwrite, fdexcep;
int maxfd = -99;
diff --git a/tests/libtest/lib556.c b/tests/libtest/lib556.c
index a4b4b93b..52793539 100644
--- a/tests/libtest/lib556.c
+++ b/tests/libtest/lib556.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -40,12 +40,12 @@ int test(char *URL)
CURLcode res;
CURL *curl;
- if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
+ if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
fprintf(stderr, "curl_global_init() failed\n");
return TEST_ERR_MAJOR_BAD;
}
- if ((curl = curl_easy_init()) == NULL) {
+ if((curl = curl_easy_init()) == NULL) {
fprintf(stderr, "curl_easy_init() failed\n");
curl_global_cleanup();
return TEST_ERR_MAJOR_BAD;
diff --git a/tests/libtest/lib557.c b/tests/libtest/lib557.c
index b8828521..5bdb8abe 100644
--- a/tests/libtest/lib557.c
+++ b/tests/libtest/lib557.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -453,6 +453,7 @@ static int test_unsigned_int_formatting(void)
#elif (SIZEOF_INT == 8)
+ /* !checksrc! disable LONGLINE all */
i=1; ui_test[i].num = 0xFFFFFFFFFFFFFFFFU; ui_test[i].expected = "18446744073709551615";
i++; ui_test[i].num = 0xFFFFFFFF00000000U; ui_test[i].expected = "18446744069414584320";
i++; ui_test[i].num = 0x00000000FFFFFFFFU; ui_test[i].expected = "4294967295";
@@ -1344,6 +1345,7 @@ static int test_curl_off_t_formatting(void)
num_cofft_tests = i;
#endif
+ /* !checksrc! enable LONGLINE */
for(i=1; i<=num_cofft_tests; i++) {
@@ -1351,11 +1353,12 @@ static int test_curl_off_t_formatting(void)
co_test[i].result[j] = 'X';
co_test[i].result[BUFSZ-1] = '\0';
- (void)curl_msprintf(co_test[i].result, "%" CURL_FORMAT_CURL_OFF_T, co_test[i].num);
+ (void)curl_msprintf(co_test[i].result, "%" CURL_FORMAT_CURL_OFF_T,
+ co_test[i].num);
if(memcmp(co_test[i].result,
- co_test[i].expected,
- strlen(co_test[i].expected))) {
+ co_test[i].expected,
+ strlen(co_test[i].expected))) {
printf("curl_off_t test #%.2d: Failed (Expected: %s Got: %s)\n",
i, co_test[i].expected, co_test[i].result);
failed++;
@@ -1371,6 +1374,53 @@ static int test_curl_off_t_formatting(void)
return failed;
}
+static int string_check(char *buf, const char *buf2)
+{
+ if(strcmp(buf, buf2)) {
+ /* they shouldn't differ */
+ printf("sprintf failed:\nwe '%s'\nsystem: '%s'\n",
+ buf, buf2);
+ return 1;
+ }
+ return 0;
+}
+
+/*
+ * The output strings in this test need to have been verified with a system
+ * sprintf() before used here.
+ */
+static int test_string_formatting(void)
+{
+ int errors = 0;
+ char buf[256];
+ curl_msnprintf(buf, sizeof(buf), "%0*d%s", 2, 9, "foo");
+ errors += string_check(buf, "09foo");
+
+ curl_msnprintf(buf, sizeof(buf), "%*.*s", 5, 2, "foo");
+ errors += string_check(buf, " fo");
+
+ curl_msnprintf(buf, sizeof(buf), "%*.*s", 2, 5, "foo");
+ errors += string_check(buf, "foo");
+
+ curl_msnprintf(buf, sizeof(buf), "%*.*s", 0, 10, "foo");
+ errors += string_check(buf, "foo");
+
+ curl_msnprintf(buf, sizeof(buf), "%-10s", "foo");
+ errors += string_check(buf, "foo ");
+
+ curl_msnprintf(buf, sizeof(buf), "%10s", "foo");
+ errors += string_check(buf, " foo");
+
+ curl_msnprintf(buf, sizeof(buf), "%*.*s", -10, -10, "foo");
+ errors += string_check(buf, "foo ");
+
+ if(!errors)
+ printf("All curl_mprintf() strings tests OK!\n");
+ else
+ printf("Some curl_mprintf() string tests Failed!\n");
+
+ return errors;
+}
int test(char *URL)
{
@@ -1391,6 +1441,8 @@ int test(char *URL)
errors += test_curl_off_t_formatting();
+ errors += test_string_formatting();
+
if(errors)
return TEST_ERR_MAJOR_BAD;
else
diff --git a/tests/libtest/lib558.c b/tests/libtest/lib558.c
index 1286a1d1..09a50d6b 100644
--- a/tests/libtest/lib558.c
+++ b/tests/libtest/lib558.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -33,7 +33,7 @@ int test(char *URL)
(void)URL; /* we don't use this */
- if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
+ if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
fprintf(stderr, "curl_global_init() failed\n");
return TEST_ERR_MAJOR_BAD;
}
diff --git a/tests/libtest/lib560.c b/tests/libtest/lib560.c
index e8be1c7b..8fa0c2de 100644
--- a/tests/libtest/lib560.c
+++ b/tests/libtest/lib560.c
@@ -9,7 +9,7 @@
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib562.c b/tests/libtest/lib562.c
index a5f0ea53..819b5075 100644
--- a/tests/libtest/lib562.c
+++ b/tests/libtest/lib562.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -40,13 +40,13 @@ int test(char *URL)
CURL *curl;
CURLcode res = CURLE_OK;
- if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
+ if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
fprintf(stderr, "curl_global_init() failed\n");
return TEST_ERR_MAJOR_BAD;
}
/* get a curl handle */
- if ((curl = curl_easy_init()) == NULL) {
+ if((curl = curl_easy_init()) == NULL) {
fprintf(stderr, "curl_easy_init() failed\n");
curl_global_cleanup();
return TEST_ERR_MAJOR_BAD;
@@ -59,7 +59,7 @@ int test(char *URL)
test_setopt(curl, CURLOPT_PORT, strtol(libtest_arg2, NULL, 10));
/* specify target */
- test_setopt(curl,CURLOPT_URL, URL);
+ test_setopt(curl, CURLOPT_URL, URL);
/* Now run off and do what you've been told! */
res = curl_easy_perform(curl);
diff --git a/tests/libtest/lib564.c b/tests/libtest/lib564.c
index 2a0a5665..1822931b 100644
--- a/tests/libtest/lib564.c
+++ b/tests/libtest/lib564.c
@@ -9,7 +9,7 @@
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib566.c b/tests/libtest/lib566.c
index ba839d65..94a91d5d 100644
--- a/tests/libtest/lib566.c
+++ b/tests/libtest/lib566.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -30,12 +30,12 @@ int test(char *URL)
double content_length = 3;
- if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
+ if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
fprintf(stderr, "curl_global_init() failed\n");
return TEST_ERR_MAJOR_BAD;
}
- if ((curl = curl_easy_init()) == NULL) {
+ if((curl = curl_easy_init()) == NULL) {
fprintf(stderr, "curl_easy_init() failed\n");
curl_global_cleanup();
return TEST_ERR_MAJOR_BAD;
diff --git a/tests/libtest/lib567.c b/tests/libtest/lib567.c
index 573529cd..38e0c0b7 100644
--- a/tests/libtest/lib567.c
+++ b/tests/libtest/lib567.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -32,12 +32,12 @@ int test(char *URL)
CURL *curl;
struct curl_slist *custom_headers=NULL;
- if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
+ if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
fprintf(stderr, "curl_global_init() failed\n");
return TEST_ERR_MAJOR_BAD;
}
- if ((curl = curl_easy_init()) == NULL) {
+ if((curl = curl_easy_init()) == NULL) {
fprintf(stderr, "curl_easy_init() failed\n");
curl_global_cleanup();
return TEST_ERR_MAJOR_BAD;
diff --git a/tests/libtest/lib568.c b/tests/libtest/lib568.c
index b6f5ab7c..9b3a0778 100644
--- a/tests/libtest/lib568.c
+++ b/tests/libtest/lib568.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -50,12 +50,12 @@ int test(char *URL)
int request=1;
struct curl_slist *custom_headers=NULL;
- if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
+ if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
fprintf(stderr, "curl_global_init() failed\n");
return TEST_ERR_MAJOR_BAD;
}
- if ((curl = curl_easy_init()) == NULL) {
+ if((curl = curl_easy_init()) == NULL) {
fprintf(stderr, "curl_easy_init() failed\n");
curl_global_cleanup();
return TEST_ERR_MAJOR_BAD;
@@ -131,7 +131,8 @@ int test(char *URL)
}
test_setopt(curl, CURLOPT_RTSPHEADER, custom_headers);
test_setopt(curl, CURLOPT_RTSP_REQUEST, CURL_RTSPREQ_ANNOUNCE);
- test_setopt(curl, CURLOPT_POSTFIELDS, "postyfield=postystuff&project=curl\n");
+ test_setopt(curl, CURLOPT_POSTFIELDS,
+ "postyfield=postystuff&project=curl\n");
res = curl_easy_perform(curl);
if(res)
diff --git a/tests/libtest/lib569.c b/tests/libtest/lib569.c
index bc488727..55282b69 100644
--- a/tests/libtest/lib569.c
+++ b/tests/libtest/lib569.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -47,13 +47,13 @@ int test(char *URL)
return TEST_ERR_MAJOR_BAD;
}
- if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
+ if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
fprintf(stderr, "curl_global_init() failed\n");
fclose(idfile);
return TEST_ERR_MAJOR_BAD;
}
- if ((curl = curl_easy_init()) == NULL) {
+ if((curl = curl_easy_init()) == NULL) {
fprintf(stderr, "curl_easy_init() failed\n");
curl_global_cleanup();
fclose(idfile);
@@ -86,7 +86,8 @@ int test(char *URL)
stream_uri = NULL;
test_setopt(curl, CURLOPT_RTSP_REQUEST, CURL_RTSPREQ_SETUP);
- test_setopt(curl, CURLOPT_RTSP_TRANSPORT, "Fake/NotReal/JustATest;foo=baz");
+ test_setopt(curl, CURLOPT_RTSP_TRANSPORT,
+ "Fake/NotReal/JustATest;foo=baz");
res = curl_easy_perform(curl);
if(res)
goto test_cleanup;
diff --git a/tests/libtest/lib570.c b/tests/libtest/lib570.c
index 178f58f9..2dc57b76 100644
--- a/tests/libtest/lib570.c
+++ b/tests/libtest/lib570.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -35,12 +35,12 @@ int test(char *URL)
int request=1;
char *stream_uri = NULL;
- if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
+ if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
fprintf(stderr, "curl_global_init() failed\n");
return TEST_ERR_MAJOR_BAD;
}
- if ((curl = curl_easy_init()) == NULL) {
+ if((curl = curl_easy_init()) == NULL) {
fprintf(stderr, "curl_easy_init() failed\n");
curl_global_cleanup();
return TEST_ERR_MAJOR_BAD;
diff --git a/tests/libtest/lib571.c b/tests/libtest/lib571.c
index d8dad396..ad6c366b 100644
--- a/tests/libtest/lib571.c
+++ b/tests/libtest/lib571.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -75,8 +75,9 @@ static size_t rtp_write(void *ptr, size_t size, size_t nmemb, void *stream) {
printf("RTP PAYLOAD CORRUPTED [%s]\n", data + i);
return failure;
}
- } else {
- if (memcmp(RTP_DATA, data + i, message_size - i) != 0) {
+ }
+ else {
+ if(memcmp(RTP_DATA, data + i, message_size - i) != 0) {
printf("RTP PAYLOAD END CORRUPTED (%d), [%s]\n",
message_size - i, data + i);
return failure;
@@ -110,13 +111,13 @@ int test(char *URL)
return TEST_ERR_MAJOR_BAD;
}
- if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
+ if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
fprintf(stderr, "curl_global_init() failed\n");
fclose(protofile);
return TEST_ERR_MAJOR_BAD;
}
- if ((curl = curl_easy_init()) == NULL) {
+ if((curl = curl_easy_init()) == NULL) {
fprintf(stderr, "curl_easy_init() failed\n");
fclose(protofile);
curl_global_cleanup();
diff --git a/tests/libtest/lib572.c b/tests/libtest/lib572.c
index fd547b8b..3475e806 100644
--- a/tests/libtest/lib572.c
+++ b/tests/libtest/lib572.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -50,12 +50,12 @@ int test(char *URL)
int request=1;
struct curl_slist *custom_headers=NULL;
- if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
+ if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
fprintf(stderr, "curl_global_init() failed\n");
return TEST_ERR_MAJOR_BAD;
}
- if ((curl = curl_easy_init()) == NULL) {
+ if((curl = curl_easy_init()) == NULL) {
fprintf(stderr, "curl_easy_init() failed\n");
curl_global_cleanup();
return TEST_ERR_MAJOR_BAD;
diff --git a/tests/libtest/lib573.c b/tests/libtest/lib573.c
index 9c333877..dce198b5 100644
--- a/tests/libtest/lib573.c
+++ b/tests/libtest/lib573.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -44,7 +44,7 @@ int test(char *URL)
dbl_epsilon = 1.0;
do {
dbl_epsilon /= 2.0;
- } while ((double)(1.0 + (dbl_epsilon/2.0)) > (double)1.0);
+ } while((double)(1.0 + (dbl_epsilon/2.0)) > (double)1.0);
start_test_timing();
@@ -65,7 +65,7 @@ int test(char *URL)
multi_add_handle(m, c);
- while (running) {
+ while(running) {
struct timeval timeout;
fd_set fdread, fdwrite, fdexcep;
int maxfd = -99;
@@ -94,7 +94,7 @@ int test(char *URL)
}
curl_easy_getinfo(c, CURLINFO_CONNECT_TIME, &connect_time);
- if (connect_time < dbl_epsilon) {
+ if(connect_time < dbl_epsilon) {
fprintf(stderr, "connect time %e is < epsilon %e\n",
connect_time, dbl_epsilon);
res = TEST_ERR_MAJOR_BAD;
diff --git a/tests/libtest/lib574.c b/tests/libtest/lib574.c
index afb2bcea..9f9222b3 100644
--- a/tests/libtest/lib574.c
+++ b/tests/libtest/lib574.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -35,12 +35,12 @@ int test(char *URL)
int res;
CURL *curl;
- if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
+ if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
fprintf(stderr, "curl_global_init() failed\n");
return TEST_ERR_MAJOR_BAD;
}
- if ((curl = curl_easy_init()) == NULL) {
+ if((curl = curl_easy_init()) == NULL) {
fprintf(stderr, "curl_easy_init() failed\n");
curl_global_cleanup();
return TEST_ERR_MAJOR_BAD;
diff --git a/tests/libtest/lib575.c b/tests/libtest/lib575.c
index 942df68c..186170cf 100644
--- a/tests/libtest/lib575.c
+++ b/tests/libtest/lib575.c
@@ -9,7 +9,7 @@
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib576.c b/tests/libtest/lib576.c
index 61bb6132..3b9a9001 100644
--- a/tests/libtest/lib576.c
+++ b/tests/libtest/lib576.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -74,7 +74,8 @@ long chunk_bgn(const struct curl_fileinfo *finfo, void *ptr, int remains)
}
if(finfo->filetype == CURLFILETYPE_FILE) {
ch_d->print_content = 1;
- printf("Content:\n-------------------------------------------------------------\n");
+ printf("Content:\n-----------------------"
+ "--------------------------------------\n");
}
if(strcmp(finfo->filename, "someothertext.txt") == 0) {
printf("# THIS CONTENT WAS SKIPPED IN CHUNK_BGN CALLBACK #\n");
@@ -100,7 +101,7 @@ int test(char *URL)
{
CURL *handle = NULL;
CURLcode res = CURLE_OK;
- chunk_data_t chunk_data = {0,0};
+ chunk_data_t chunk_data = {0, 0};
curl_global_init(CURL_GLOBAL_ALL);
handle = curl_easy_init();
if(!handle) {
diff --git a/tests/libtest/lib578.c b/tests/libtest/lib578.c
index a39b3177..5e01d36e 100644
--- a/tests/libtest/lib578.c
+++ b/tests/libtest/lib578.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -28,7 +28,8 @@ static char data[]="this is a short string.\n";
static size_t data_size = sizeof(data) / sizeof(char);
-static int progress_callback(void *clientp, double dltotal, double dlnow, double ultotal, double ulnow)
+static int progress_callback(void *clientp, double dltotal, double dlnow,
+ double ultotal, double ulnow)
{
FILE *moo = fopen(libtest_arg2, "wb");
@@ -37,10 +38,11 @@ static int progress_callback(void *clientp, double dltotal, double dlnow, double
(void)dlnow; /* UNUSED */
if(moo) {
- if ((size_t)ultotal == data_size && (size_t)ulnow == data_size)
+ if((size_t)ultotal == data_size && (size_t)ulnow == data_size)
fprintf(moo, "PASSED, UL data matched data size\n");
else
- fprintf(moo, "Progress callback called with UL %f out of %f\n", ulnow, ultotal);
+ fprintf(moo, "Progress callback called with UL %f out of %f\n",
+ ulnow, ultotal);
fclose(moo);
}
return 0;
@@ -51,12 +53,12 @@ int test(char *URL)
CURL *curl;
CURLcode res=CURLE_OK;
- if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
+ if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
fprintf(stderr, "curl_global_init() failed\n");
return TEST_ERR_MAJOR_BAD;
}
- if ((curl = curl_easy_init()) == NULL) {
+ if((curl = curl_easy_init()) == NULL) {
fprintf(stderr, "curl_easy_init() failed\n");
curl_global_cleanup();
return TEST_ERR_MAJOR_BAD;
diff --git a/tests/libtest/lib579.c b/tests/libtest/lib579.c
index 0e8bd2f1..aae299cc 100644
--- a/tests/libtest/lib579.c
+++ b/tests/libtest/lib579.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -92,19 +92,19 @@ int test(char *URL)
struct WriteThis pooh;
pooh.counter = 0;
- if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
+ if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
fprintf(stderr, "curl_global_init() failed\n");
return TEST_ERR_MAJOR_BAD;
}
- if ((curl = curl_easy_init()) == NULL) {
+ if((curl = curl_easy_init()) == NULL) {
fprintf(stderr, "curl_easy_init() failed\n");
curl_global_cleanup();
return TEST_ERR_MAJOR_BAD;
}
slist = curl_slist_append(slist, "Transfer-Encoding: chunked");
- if (slist == NULL) {
+ if(slist == NULL) {
fprintf(stderr, "curl_slist_append() failed\n");
curl_easy_cleanup(curl);
curl_global_cleanup();
diff --git a/tests/libtest/lib582.c b/tests/libtest/lib582.c
index 4c3ea6f6..444b416f 100644
--- a/tests/libtest/lib582.c
+++ b/tests/libtest/lib582.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -51,9 +51,9 @@ static void removeFd(struct Sockets* sockets, curl_socket_t fd, int mention)
if(mention)
fprintf(stderr, "Remove socket fd %d\n", (int) fd);
- for (i = 0; i < sockets->count; ++i) {
- if (sockets->sockets[i] == fd) {
- if (i < sockets->count - 1)
+ for(i = 0; i < sockets->count; ++i) {
+ if(sockets->sockets[i] == fd) {
+ if(i < sockets->count - 1)
memmove(&sockets->sockets[i], &sockets->sockets[i + 1],
sizeof(curl_socket_t) * (sockets->count - (i + 1)));
--sockets->count;
@@ -110,10 +110,10 @@ static int curlSocketCallback(CURL *easy, curl_socket_t s, int action,
(void)easy; /* unused */
(void)socketp; /* unused */
- if (action == CURL_POLL_IN || action == CURL_POLL_INOUT)
+ if(action == CURL_POLL_IN || action == CURL_POLL_INOUT)
addFd(&sockets->read, s, "read");
- if (action == CURL_POLL_OUT || action == CURL_POLL_INOUT)
+ if(action == CURL_POLL_OUT || action == CURL_POLL_INOUT)
addFd(&sockets->write, s, "write");
if(action == CURL_POLL_REMOVE) {
@@ -132,7 +132,7 @@ static int curlTimerCallback(CURLM *multi, long timeout_ms, void *userp)
struct timeval* timeout = userp;
(void)multi; /* unused */
- if (timeout_ms != -1) {
+ if(timeout_ms != -1) {
*timeout = tutil_tvnow();
timeout->tv_usec += timeout_ms * 1000;
}
@@ -151,10 +151,10 @@ static int checkForCompletion(CURLM* curl, int* success)
CURLMsg* message;
int result = 0;
*success = 0;
- while ((message = curl_multi_info_read(curl, &numMessages)) != NULL) {
- if (message->msg == CURLMSG_DONE) {
+ while((message = curl_multi_info_read(curl, &numMessages)) != NULL) {
+ if(message->msg == CURLMSG_DONE) {
result = 1;
- if (message->data.result == CURLE_OK)
+ if(message->data.result == CURLE_OK)
*success = 1;
else
*success = 0;
@@ -176,7 +176,7 @@ static int getMicroSecondTimeout(struct timeval* timeout)
now = tutil_tvnow();
result = (timeout->tv_sec - now.tv_sec) * 1000000 +
timeout->tv_usec - now.tv_usec;
- if (result < 0)
+ if(result < 0)
result = 0;
return curlx_sztosi(result);
@@ -189,9 +189,9 @@ static void updateFdSet(struct Sockets* sockets, fd_set* fdset,
curl_socket_t *maxFd)
{
int i;
- for (i = 0; i < sockets->count; ++i) {
+ for(i = 0; i < sockets->count; ++i) {
FD_SET(sockets->sockets[i], fdset);
- if (*maxFd < sockets->sockets[i] + 1) {
+ if(*maxFd < sockets->sockets[i] + 1) {
*maxFd = sockets->sockets[i] + 1;
}
}
@@ -202,7 +202,7 @@ static void notifyCurl(CURLM *curl, curl_socket_t s, int evBitmask,
{
int numhandles = 0;
CURLMcode result = curl_multi_socket_action(curl, s, evBitmask, &numhandles);
- if (result != CURLM_OK) {
+ if(result != CURLM_OK) {
fprintf(stderr, "Curl error on %s: %i (%s)\n",
info, result, curl_multi_strerror(result));
}
@@ -215,8 +215,8 @@ static void checkFdSet(CURLM *curl, struct Sockets *sockets, fd_set *fdset,
int evBitmask, const char *name)
{
int i;
- for (i = 0; i < sockets->count; ++i) {
- if (FD_ISSET(sockets->sockets[i], fdset)) {
+ for(i = 0; i < sockets->count; ++i) {
+ if(FD_ISSET(sockets->sockets[i], fdset)) {
notifyCurl(curl, sockets->sockets[i], evBitmask, name);
}
}
@@ -227,7 +227,7 @@ int test(char *URL)
int res = 0;
CURL *curl = NULL;
FILE *hd_src = NULL;
- int hd ;
+ int hd;
int error;
struct_stat file_info;
CURLM *m = NULL;
@@ -237,7 +237,7 @@ int test(char *URL)
start_test_timing();
- if (!libtest_arg3) {
+ if(!libtest_arg3) {
fprintf(stderr, "Usage: lib582 [url] [filename] [username]\n");
return TEST_ERR_USAGE;
}
@@ -276,7 +276,7 @@ int test(char *URL)
easy_setopt(curl, CURLOPT_UPLOAD, 1L);
/* specify target */
- easy_setopt(curl,CURLOPT_URL, URL);
+ easy_setopt(curl, CURLOPT_URL, URL);
/* go verbose */
easy_setopt(curl, CURLOPT_VERBOSE, 1L);
@@ -300,8 +300,7 @@ int test(char *URL)
multi_add_handle(m, curl);
- while (!checkForCompletion(m, &success))
- {
+ while(!checkForCompletion(m, &success)) {
fd_set readSet, writeSet;
curl_socket_t maxFd = 0;
struct timeval tv = {10, 0};
@@ -311,14 +310,12 @@ int test(char *URL)
updateFdSet(&sockets.read, &readSet, &maxFd);
updateFdSet(&sockets.write, &writeSet, &maxFd);
- if (timeout.tv_sec != -1)
- {
+ if(timeout.tv_sec != -1) {
int usTimeout = getMicroSecondTimeout(&timeout);
tv.tv_sec = usTimeout / 1000000;
tv.tv_usec = usTimeout % 1000000;
}
- else if (maxFd <= 0)
- {
+ else if(maxFd <= 0) {
tv.tv_sec = 0;
tv.tv_usec = 100000;
}
@@ -329,8 +326,7 @@ int test(char *URL)
checkFdSet(m, &sockets.read, &readSet, CURL_CSELECT_IN, "read");
checkFdSet(m, &sockets.write, &writeSet, CURL_CSELECT_OUT, "write");
- if (timeout.tv_sec != -1 && getMicroSecondTimeout(&timeout) == 0)
- {
+ if(timeout.tv_sec != -1 && getMicroSecondTimeout(&timeout) == 0) {
/* Curl's timer has elapsed. */
notifyCurl(m, CURL_SOCKET_TIMEOUT, 0, "timeout");
}
@@ -338,8 +334,7 @@ int test(char *URL)
abort_on_test_timeout();
}
- if (!success)
- {
+ if(!success) {
fprintf(stderr, "Error uploading file.\n");
res = TEST_ERR_MAJOR_BAD;
}
diff --git a/tests/libtest/lib583.c b/tests/libtest/lib583.c
index ad5a5cea..9af48d28 100644
--- a/tests/libtest/lib583.c
+++ b/tests/libtest/lib583.c
@@ -9,7 +9,7 @@
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -21,7 +21,7 @@
***************************************************************************/
/*
* This test case is based on the sample code provided by Saqib Ali
- * http://curl.haxx.se/mail/lib-2011-03/0066.html
+ * https://curl.haxx.se/mail/lib-2011-03/0066.html
*/
#include "test.h"
diff --git a/tests/libtest/lib586.c b/tests/libtest/lib586.c
index a1412b5f..eb7cfa0a 100644
--- a/tests/libtest/lib586.c
+++ b/tests/libtest/lib586.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -36,8 +36,8 @@ struct userdata {
};
/* lock callback */
-static void my_lock(CURL *handle, curl_lock_data data, curl_lock_access laccess,
- void *useptr )
+static void my_lock(CURL *handle, curl_lock_data data,
+ curl_lock_access laccess, void *useptr)
{
const char *what;
struct userdata *user = (struct userdata *)useptr;
@@ -45,7 +45,7 @@ static void my_lock(CURL *handle, curl_lock_data data, curl_lock_access laccess,
(void)handle;
(void)laccess;
- switch ( data ) {
+ switch (data) {
case CURL_LOCK_DATA_SHARE:
what = "share";
break;
@@ -67,12 +67,12 @@ static void my_lock(CURL *handle, curl_lock_data data, curl_lock_access laccess,
}
/* unlock callback */
-static void my_unlock(CURL *handle, curl_lock_data data, void *useptr )
+static void my_unlock(CURL *handle, curl_lock_data data, void *useptr)
{
const char *what;
struct userdata *user = (struct userdata *)useptr;
(void)handle;
- switch ( data ) {
+ switch ( data) {
case CURL_LOCK_DATA_SHARE:
what = "share";
break;
@@ -101,7 +101,7 @@ static void *fire(void *ptr)
CURL *curl;
int i=0;
- if ((curl = curl_easy_init()) == NULL) {
+ if((curl = curl_easy_init()) == NULL) {
fprintf(stderr, "curl_easy_init() failed\n");
return NULL;
}
@@ -109,17 +109,17 @@ static void *fire(void *ptr)
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
curl_easy_setopt(curl, CURLOPT_URL, tdata->url);
- printf( "CURLOPT_SHARE\n" );
+ printf("CURLOPT_SHARE\n");
curl_easy_setopt(curl, CURLOPT_SHARE, tdata->share);
- printf( "PERFORM\n" );
+ printf("PERFORM\n");
code = curl_easy_perform(curl);
- if( code != CURLE_OK ) {
+ if(code != CURLE_OK) {
fprintf(stderr, "perform url '%s' repeat %d failed, curlcode %d\n",
tdata->url, i, (int)code);
}
- printf( "CLEANUP\n" );
+ printf("CLEANUP\n");
curl_easy_cleanup(curl);
return NULL;
@@ -140,38 +140,39 @@ int test(char *URL)
user.text = (char *)"Pigs in space";
user.counter = 0;
- printf( "GLOBAL_INIT\n" );
- if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
+ printf("GLOBAL_INIT\n");
+ if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
fprintf(stderr, "curl_global_init() failed\n");
return TEST_ERR_MAJOR_BAD;
}
/* prepare share */
- printf( "SHARE_INIT\n" );
- if ((share = curl_share_init()) == NULL) {
+ printf("SHARE_INIT\n");
+ if((share = curl_share_init()) == NULL) {
fprintf(stderr, "curl_share_init() failed\n");
curl_global_cleanup();
return TEST_ERR_MAJOR_BAD;
}
- if ( CURLSHE_OK == scode ) {
- printf( "CURLSHOPT_LOCKFUNC\n" );
- scode = curl_share_setopt( share, CURLSHOPT_LOCKFUNC, my_lock);
+ if(CURLSHE_OK == scode) {
+ printf("CURLSHOPT_LOCKFUNC\n");
+ scode = curl_share_setopt(share, CURLSHOPT_LOCKFUNC, my_lock);
}
- if ( CURLSHE_OK == scode ) {
- printf( "CURLSHOPT_UNLOCKFUNC\n" );
- scode = curl_share_setopt( share, CURLSHOPT_UNLOCKFUNC, my_unlock);
+ if(CURLSHE_OK == scode) {
+ printf("CURLSHOPT_UNLOCKFUNC\n");
+ scode = curl_share_setopt(share, CURLSHOPT_UNLOCKFUNC, my_unlock);
}
- if ( CURLSHE_OK == scode ) {
- printf( "CURLSHOPT_USERDATA\n" );
- scode = curl_share_setopt( share, CURLSHOPT_USERDATA, &user);
+ if(CURLSHE_OK == scode) {
+ printf("CURLSHOPT_USERDATA\n");
+ scode = curl_share_setopt(share, CURLSHOPT_USERDATA, &user);
}
- if ( CURLSHE_OK == scode ) {
- printf( "CURL_LOCK_DATA_SSL_SESSION\n" );
- scode = curl_share_setopt( share, CURLSHOPT_SHARE, CURL_LOCK_DATA_SSL_SESSION);
+ if(CURLSHE_OK == scode) {
+ printf("CURL_LOCK_DATA_SSL_SESSION\n");
+ scode = curl_share_setopt(share, CURLSHOPT_SHARE,
+ CURL_LOCK_DATA_SSL_SESSION);
}
- if ( CURLSHE_OK != scode ) {
+ if(CURLSHE_OK != scode) {
fprintf(stderr, "curl_share_setopt() failed\n");
curl_share_cleanup(share);
curl_global_cleanup();
@@ -182,21 +183,21 @@ int test(char *URL)
res = 0;
/* start treads */
- for (i=1; i<=THREADS; i++ ) {
+ for(i=1; i<=THREADS; i++) {
/* set thread data */
tdata.url = URL;
tdata.share = share;
/* simulate thread, direct call of "thread" function */
- printf( "*** run %d\n",i );
- fire( &tdata );
+ printf("*** run %d\n",i);
+ fire(&tdata);
}
/* fetch a another one */
- printf( "*** run %d\n", i );
- if ((curl = curl_easy_init()) == NULL) {
+ printf("*** run %d\n", i);
+ if((curl = curl_easy_init()) == NULL) {
fprintf(stderr, "curl_easy_init() failed\n");
curl_share_cleanup(share);
curl_global_cleanup();
@@ -204,38 +205,38 @@ int test(char *URL)
}
url = URL;
- test_setopt( curl, CURLOPT_URL, url );
- printf( "CURLOPT_SHARE\n" );
- test_setopt( curl, CURLOPT_SHARE, share );
+ test_setopt(curl, CURLOPT_URL, url);
+ printf("CURLOPT_SHARE\n");
+ test_setopt(curl, CURLOPT_SHARE, share);
- printf( "PERFORM\n" );
- curl_easy_perform( curl );
+ printf("PERFORM\n");
+ curl_easy_perform(curl);
/* try to free share, expect to fail because share is in use*/
- printf( "try SHARE_CLEANUP...\n" );
- scode = curl_share_cleanup( share );
- if ( scode==CURLSHE_OK )
- {
+ printf("try SHARE_CLEANUP...\n");
+ scode = curl_share_cleanup(share);
+ if(scode==CURLSHE_OK) {
fprintf(stderr, "curl_share_cleanup succeed but error expected\n");
share = NULL;
- } else {
- printf( "SHARE_CLEANUP failed, correct\n" );
+ }
+ else {
+ printf("SHARE_CLEANUP failed, correct\n");
}
test_cleanup:
/* clean up last handle */
- printf( "CLEANUP\n" );
- curl_easy_cleanup( curl );
+ printf("CLEANUP\n");
+ curl_easy_cleanup(curl);
/* free share */
- printf( "SHARE_CLEANUP\n" );
- scode = curl_share_cleanup( share );
- if ( scode!=CURLSHE_OK )
+ printf("SHARE_CLEANUP\n");
+ scode = curl_share_cleanup(share);
+ if(scode!=CURLSHE_OK)
fprintf(stderr, "curl_share_cleanup failed, code errno %d\n",
(int)scode);
- printf( "GLOBAL_CLEANUP\n" );
+ printf("GLOBAL_CLEANUP\n");
curl_global_cleanup();
return res;
diff --git a/tests/libtest/lib590.c b/tests/libtest/lib590.c
index 68603c65..7b863cc3 100644
--- a/tests/libtest/lib590.c
+++ b/tests/libtest/lib590.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -23,14 +23,14 @@
/*
Based on a bug report recipe by Rene Bernhardt in
- http://curl.haxx.se/mail/lib-2011-10/0323.html
+ https://curl.haxx.se/mail/lib-2011-10/0323.html
It is reproducible by the following steps:
- Use a proxy that offers NTLM and Negotiate ( CURLOPT_PROXY and
- CURLOPT_PROXYPORT )
+ CURLOPT_PROXYPORT)
- Tell libcurl NOT to use Negotiate CURL_EASY_SETOPT(CURLOPT_PROXYAUTH,
- CURLAUTH_BASIC | CURLAUTH_DIGEST | CURLAUTH_NTLM )
+ CURLAUTH_BASIC | CURLAUTH_DIGEST | CURLAUTH_NTLM)
- Start the request
*/
@@ -41,12 +41,12 @@ int test(char *URL)
CURLcode res;
CURL *curl;
- if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
+ if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
fprintf(stderr, "curl_global_init() failed\n");
return TEST_ERR_MAJOR_BAD;
}
- if ((curl = curl_easy_init()) == NULL) {
+ if((curl = curl_easy_init()) == NULL) {
fprintf(stderr, "curl_easy_init() failed\n");
curl_global_cleanup();
return TEST_ERR_MAJOR_BAD;
diff --git a/tests/libtest/lib591.c b/tests/libtest/lib591.c
index 5cd4644e..7d50f894 100644
--- a/tests/libtest/lib591.c
+++ b/tests/libtest/lib591.c
@@ -9,7 +9,7 @@
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/lib597.c b/tests/libtest/lib597.c
index a27cefd5..813af754 100644
--- a/tests/libtest/lib597.c
+++ b/tests/libtest/lib597.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -69,7 +69,7 @@ int test(char *URL)
multi_init(multi);
- for (phase = CONNECT_ONLY_PHASE; phase < LAST_PHASE; ++phase) {
+ for(phase = CONNECT_ONLY_PHASE; phase < LAST_PHASE; ++phase) {
/* go verbose */
easy_setopt(easy, CURLOPT_VERBOSE, 1L);
@@ -77,11 +77,11 @@ int test(char *URL)
easy_setopt(easy, CURLOPT_URL, URL);
/* enable 'CONNECT_ONLY' option when in connect phase */
- if (phase == CONNECT_ONLY_PHASE)
+ if(phase == CONNECT_ONLY_PHASE)
easy_setopt(easy, CURLOPT_CONNECT_ONLY, 1L);
/* enable 'NOBODY' option to send 'QUIT' command in quit phase */
- if (phase == QUIT_PHASE) {
+ if(phase == QUIT_PHASE) {
easy_setopt(easy, CURLOPT_CONNECT_ONLY, 0L);
easy_setopt(easy, CURLOPT_NOBODY, 1L);
easy_setopt(easy, CURLOPT_FORBID_REUSE, 1L);
@@ -114,7 +114,8 @@ int test(char *URL)
multi_timeout(multi, &timeout);
- /* At this point, timeout is guaranteed to be greater or equal than -1. */
+ /* At this point, timeout is guaranteed to be greater or equal than
+ -1. */
if(timeout != -1L) {
int itimeout = (timeout > (long)INT_MAX) ? INT_MAX : (int)timeout;
diff --git a/tests/libtest/lib598.c b/tests/libtest/lib598.c
index e9c1ad77..b107f29d 100644
--- a/tests/libtest/lib598.c
+++ b/tests/libtest/lib598.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -28,12 +28,12 @@ int test(char *URL)
CURLcode res;
CURL *curl;
- if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
+ if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
fprintf(stderr, "curl_global_init() failed\n");
return TEST_ERR_MAJOR_BAD;
}
- if ((curl = curl_easy_init()) == NULL) {
+ if((curl = curl_easy_init()) == NULL) {
fprintf(stderr, "curl_easy_init() failed\n");
curl_global_cleanup();
return TEST_ERR_MAJOR_BAD;
diff --git a/tests/libtest/lib599.c b/tests/libtest/lib599.c
index 08c536c7..1dee0b97 100644
--- a/tests/libtest/lib599.c
+++ b/tests/libtest/lib599.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -45,12 +45,12 @@ int test(char *URL)
CURLcode res=CURLE_OK;
double content_length = 0.0;
- if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
+ if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
fprintf(stderr, "curl_global_init() failed\n");
return TEST_ERR_MAJOR_BAD;
}
- if ((curl = curl_easy_init()) == NULL) {
+ if((curl = curl_easy_init()) == NULL) {
fprintf(stderr, "curl_easy_init() failed\n");
curl_global_cleanup();
return TEST_ERR_MAJOR_BAD;
@@ -75,12 +75,12 @@ int test(char *URL)
/* Perform the request, res will get the return code */
res = curl_easy_perform(curl);
- if (!res) {
+ if(!res) {
FILE *moo;
res = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD,
&content_length);
moo = fopen(libtest_arg2, "wb");
- if (moo) {
+ if(moo) {
fprintf(moo, "CL: %.0f\n", content_length);
fclose(moo);
}
diff --git a/tests/libtest/libauthretry.c b/tests/libtest/libauthretry.c
index 103a89c7..994f9de0 100644
--- a/tests/libtest/libauthretry.c
+++ b/tests/libtest/libauthretry.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -32,13 +32,14 @@ static CURLcode send_request(CURL *curl, const char *url, int seq,
long auth_scheme, const char *userpwd)
{
CURLcode res;
- char* full_url = malloc(strlen(url) + 4 + 1);
- if (!full_url) {
+ size_t len = strlen(url) + 4 + 1;
+ char* full_url = malloc(len);
+ if(!full_url) {
fprintf(stderr, "Not enough memory for full url\n");
return CURLE_OUT_OF_MEMORY;
}
- sprintf(full_url, "%s%04d", url, seq);
+ snprintf(full_url, len, "%s%04d", url, seq);
fprintf(stderr, "Sending new request %d to %s with credential %s "
"(auth %ld)\n", seq, full_url, userpwd, auth_scheme);
test_setopt(curl, CURLOPT_URL, full_url);
@@ -69,13 +70,13 @@ static CURLcode send_right_password(CURL *curl, const char *url, int seq,
static long parse_auth_name(const char *arg)
{
- if (!arg)
+ if(!arg)
return CURLAUTH_NONE;
- if (strequal(arg, "basic"))
+ if(strequal(arg, "basic"))
return CURLAUTH_BASIC;
- if (strequal(arg, "digest"))
+ if(strequal(arg, "digest"))
return CURLAUTH_DIGEST;
- if (strequal(arg, "ntlm"))
+ if(strequal(arg, "ntlm"))
return CURLAUTH_NTLM;
return CURLAUTH_NONE;
}
@@ -88,58 +89,58 @@ int test(char *url)
long main_auth_scheme = parse_auth_name(libtest_arg2);
long fallback_auth_scheme = parse_auth_name(libtest_arg3);
- if (main_auth_scheme == CURLAUTH_NONE ||
+ if(main_auth_scheme == CURLAUTH_NONE ||
fallback_auth_scheme == CURLAUTH_NONE) {
fprintf(stderr, "auth schemes not found on commandline\n");
return TEST_ERR_MAJOR_BAD;
}
- if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
+ if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
fprintf(stderr, "curl_global_init() failed\n");
return TEST_ERR_MAJOR_BAD;
}
/* Send wrong password, then right password */
- if ((curl = curl_easy_init()) == NULL) {
+ if((curl = curl_easy_init()) == NULL) {
fprintf(stderr, "curl_easy_init() failed\n");
curl_global_cleanup();
return TEST_ERR_MAJOR_BAD;
}
res = send_wrong_password(curl, url, 100, main_auth_scheme);
- if (res != CURLE_OK)
- goto test_cleanup;
+ if(res != CURLE_OK)
+ goto test_cleanup;
curl_easy_reset(curl);
res = send_right_password(curl, url, 200, fallback_auth_scheme);
- if (res != CURLE_OK)
- goto test_cleanup;
+ if(res != CURLE_OK)
+ goto test_cleanup;
curl_easy_reset(curl);
curl_easy_cleanup(curl);
/* Send wrong password twice, then right password */
- if ((curl = curl_easy_init()) == NULL) {
+ if((curl = curl_easy_init()) == NULL) {
fprintf(stderr, "curl_easy_init() failed\n");
curl_global_cleanup();
return TEST_ERR_MAJOR_BAD;
}
res = send_wrong_password(curl, url, 300, main_auth_scheme);
- if (res != CURLE_OK)
- goto test_cleanup;
+ if(res != CURLE_OK)
+ goto test_cleanup;
curl_easy_reset(curl);
res = send_wrong_password(curl, url, 400, fallback_auth_scheme);
- if (res != CURLE_OK)
- goto test_cleanup;
+ if(res != CURLE_OK)
+ goto test_cleanup;
curl_easy_reset(curl);
res = send_right_password(curl, url, 500, fallback_auth_scheme);
- if (res != CURLE_OK)
- goto test_cleanup;
+ if(res != CURLE_OK)
+ goto test_cleanup;
curl_easy_reset(curl);
test_cleanup:
diff --git a/tests/libtest/libntlmconnect.c b/tests/libtest/libntlmconnect.c
index 509b6711..736222dc 100644
--- a/tests/libtest/libntlmconnect.c
+++ b/tests/libtest/libntlmconnect.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 2012 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2012 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -47,7 +47,7 @@ static size_t callback(char* ptr, size_t size, size_t nmemb, void* data)
const size_t failure = (size * nmemb) ? 0 : 1;
char *output = malloc(size * nmemb + 1);
- if (!output) {
+ if(!output) {
fprintf(stderr, "output, malloc() failed\n");
res = TEST_ERR_MAJOR_BAD;
return failure;
@@ -60,25 +60,25 @@ static size_t callback(char* ptr, size_t size, size_t nmemb, void* data)
/* Get socket being used for this easy handle, otherwise CURL_SOCKET_BAD */
code = curl_easy_getinfo(easy[idx], CURLINFO_LASTSOCKET, &longdata);
- if (CURLE_OK != code) {
+ if(CURLE_OK != code) {
fprintf(stderr, "%s:%d curl_easy_getinfo() failed, "
"with code %d (%s)\n",
__FILE__, __LINE__, (int)code, curl_easy_strerror(code));
res = TEST_ERR_MAJOR_BAD;
return failure;
}
- if (longdata == -1L)
+ if(longdata == -1L)
sock = CURL_SOCKET_BAD;
else
sock = (curl_socket_t)longdata;
- if (sock != CURL_SOCKET_BAD) {
+ if(sock != CURL_SOCKET_BAD) {
/* Track relationship between this easy handle and the socket. */
- if (sockets[idx] == CURL_SOCKET_BAD) {
+ if(sockets[idx] == CURL_SOCKET_BAD) {
/* An easy handle without previous socket, record the socket. */
sockets[idx] = sock;
}
- else if (sock != sockets[idx]) {
+ else if(sock != sockets[idx]) {
/* An easy handle with a socket different to previously
tracked one, log and fail right away. Known bug #37. */
fprintf(stderr, "Handle %d started on socket %d and moved to %d\n",
@@ -103,16 +103,17 @@ int test(char *url)
int i, j;
int num_handles = 0;
enum HandleState state = ReadyForNewHandle;
- char* full_url = malloc(strlen(url) + 4 + 1);
+ size_t urllen = strlen(url) + 4 + 1;
+ char* full_url = malloc(urllen);
start_test_timing();
- if (!full_url) {
+ if(!full_url) {
fprintf(stderr, "Not enough memory for full url\n");
return TEST_ERR_MAJOR_BAD;
}
- for (i = 0; i < MAX_EASY_HANDLES; ++i) {
+ for(i = 0; i < MAX_EASY_HANDLES; ++i) {
easy[i] = NULL;
sockets[i] = CURL_SOCKET_BAD;
}
@@ -141,14 +142,15 @@ int test(char *url)
bool found_new_socket = FALSE;
/* Start a new handle if we aren't at the max */
- if (state == ReadyForNewHandle) {
+ if(state == ReadyForNewHandle) {
easy_init(easy[num_handles]);
- if (num_handles % 3 == 2) {
- sprintf(full_url, "%s0200", url);
+ if(num_handles % 3 == 2) {
+ snprintf(full_url, urllen, "%s0200", url);
easy_setopt(easy[num_handles], CURLOPT_HTTPAUTH, CURLAUTH_NTLM);
- } else {
- sprintf(full_url, "%s0100", url);
+ }
+ else {
+ snprintf(full_url, urllen, "%s0100", url);
easy_setopt(easy[num_handles], CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
}
easy_setopt(easy[num_handles], CURLOPT_FRESH_CONNECT, 1L);
@@ -181,34 +183,34 @@ int test(char *url)
/* At this point, maxfd is guaranteed to be greater or equal than -1. */
/* Any socket which is new in fdread is associated with the new handle */
- for (i = 0; i <= maxfd; ++i) {
+ for(i = 0; i <= maxfd; ++i) {
bool socket_exists = FALSE;
curl_socket_t curfd = (curl_socket_t)i;
- if (!FD_ISSET(curfd, &fdread)) {
+ if(!FD_ISSET(curfd, &fdread)) {
continue;
}
/* Check if this socket was already detected for an earlier handle (or
for this handle, num_handles-1, in the callback */
- for (j = 0; j < num_handles; ++j) {
- if (sockets[j] == curfd) {
+ for(j = 0; j < num_handles; ++j) {
+ if(sockets[j] == curfd) {
socket_exists = TRUE;
break;
}
}
- if (socket_exists) {
+ if(socket_exists) {
continue;
}
- if (found_new_socket || state != NeedSocketForNewHandle) {
+ if(found_new_socket || state != NeedSocketForNewHandle) {
fprintf(stderr, "Unexpected new socket\n");
res = TEST_ERR_MAJOR_BAD;
goto test_cleanup;
}
/* Now we know the socket is for the most recent handle, num_handles-1 */
- if (sockets[num_handles-1] != CURL_SOCKET_BAD) {
+ if(sockets[num_handles-1] != CURL_SOCKET_BAD) {
/* A socket for this handle was already detected in the callback; if it
matched socket_exists should be true and we would never get here */
assert(curfd != sockets[num_handles-1]);
@@ -224,7 +226,7 @@ int test(char *url)
}
}
- if (state == NeedSocketForNewHandle) {
+ if(state == NeedSocketForNewHandle) {
if(maxfd != -1 && !found_new_socket) {
fprintf(stderr, "Warning: socket did not open immediately for new "
"handle (trying again)\n");
diff --git a/tests/libtest/sethostname.c b/tests/libtest/sethostname.c
index 9da6a673..210a6001 100644
--- a/tests/libtest/sethostname.c
+++ b/tests/libtest/sethostname.c
@@ -9,7 +9,7 @@
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/sethostname.h b/tests/libtest/sethostname.h
index 032eaa07..1a1c0775 100644
--- a/tests/libtest/sethostname.h
+++ b/tests/libtest/sethostname.h
@@ -9,7 +9,7 @@
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/test.h b/tests/libtest/test.h
index 468eda98..9647658d 100644
--- a/tests/libtest/test.h
+++ b/tests/libtest/test.h
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -40,15 +40,13 @@
# include "select.h"
#endif
-#define _MPRINTF_REPLACE
-#include <curl/mprintf.h>
-
+#include "curl_printf.h"
#define test_setopt(A,B,C) \
- if((res = curl_easy_setopt((A),(B),(C))) != CURLE_OK) goto test_cleanup
+ if((res = curl_easy_setopt((A), (B), (C))) != CURLE_OK) goto test_cleanup
#define test_multi_setopt(A,B,C) \
- if((res = curl_multi_setopt((A),(B),(C))) != CURLE_OK) goto test_cleanup
+ if((res = curl_multi_setopt((A), (B), (C))) != CURLE_OK) goto test_cleanup
extern char *libtest_arg2; /* set by first.c to the argv[2] or NULL */
extern char *libtest_arg3; /* set by first.c to the argv[3] or NULL */
@@ -134,16 +132,16 @@ extern int unitfail;
} WHILE_FALSE
#define res_easy_init(A) \
- exe_easy_init((A),(__FILE__),(__LINE__))
+ exe_easy_init((A), (__FILE__), (__LINE__))
#define chk_easy_init(A,Y,Z) do { \
- exe_easy_init((A),(Y),(Z)); \
+ exe_easy_init((A), (Y), (Z)); \
if(res) \
goto test_cleanup; \
} WHILE_FALSE
#define easy_init(A) \
- chk_easy_init((A),(__FILE__),(__LINE__))
+ chk_easy_init((A), (__FILE__), (__LINE__))
/* ---------------------------------------------------------------- */
@@ -155,70 +153,70 @@ extern int unitfail;
} WHILE_FALSE
#define res_multi_init(A) \
- exe_multi_init((A),(__FILE__),(__LINE__))
+ exe_multi_init((A), (__FILE__), (__LINE__))
#define chk_multi_init(A,Y,Z) do { \
- exe_multi_init((A),(Y),(Z)); \
+ exe_multi_init((A), (Y), (Z)); \
if(res) \
goto test_cleanup; \
} WHILE_FALSE
#define multi_init(A) \
- chk_multi_init((A),(__FILE__),(__LINE__))
+ chk_multi_init((A), (__FILE__), (__LINE__))
/* ---------------------------------------------------------------- */
-#define exe_easy_setopt(A,B,C,Y,Z) do { \
- CURLcode ec; \
- if((ec = curl_easy_setopt((A),(B),(C))) != CURLE_OK) { \
- fprintf(stderr, "%s:%d curl_easy_setopt() failed, " \
- "with code %d (%s)\n", \
- (Y), (Z), (int)ec, curl_easy_strerror(ec)); \
- res = (int)ec; \
- } \
+#define exe_easy_setopt(A,B,C,Y,Z) do { \
+ CURLcode ec; \
+ if((ec = curl_easy_setopt((A), (B), (C))) != CURLE_OK) { \
+ fprintf(stderr, "%s:%d curl_easy_setopt() failed, " \
+ "with code %d (%s)\n", \
+ (Y), (Z), (int)ec, curl_easy_strerror(ec)); \
+ res = (int)ec; \
+ } \
} WHILE_FALSE
-#define res_easy_setopt(A,B,C) \
- exe_easy_setopt((A),(B),(C),(__FILE__),(__LINE__))
+#define res_easy_setopt(A, B, C) \
+ exe_easy_setopt((A), (B), (C), (__FILE__), (__LINE__))
-#define chk_easy_setopt(A,B,C,Y,Z) do { \
- exe_easy_setopt((A),(B),(C),(Y),(Z)); \
- if(res) \
- goto test_cleanup; \
+#define chk_easy_setopt(A, B, C, Y, Z) do { \
+ exe_easy_setopt((A), (B), (C), (Y), (Z)); \
+ if(res) \
+ goto test_cleanup; \
} WHILE_FALSE
-#define easy_setopt(A,B,C) \
- chk_easy_setopt((A),(B),(C),(__FILE__),(__LINE__))
+#define easy_setopt(A, B, C) \
+ chk_easy_setopt((A), (B), (C), (__FILE__), (__LINE__))
/* ---------------------------------------------------------------- */
-#define exe_multi_setopt(A,B,C,Y,Z) do { \
- CURLMcode ec; \
- if((ec = curl_multi_setopt((A),(B),(C))) != CURLM_OK) { \
- fprintf(stderr, "%s:%d curl_multi_setopt() failed, " \
- "with code %d (%s)\n", \
- (Y), (Z), (int)ec, curl_multi_strerror(ec)); \
- res = (int)ec; \
- } \
+#define exe_multi_setopt(A, B, C, Y, Z) do { \
+ CURLMcode ec; \
+ if((ec = curl_multi_setopt((A), (B), (C))) != CURLM_OK) { \
+ fprintf(stderr, "%s:%d curl_multi_setopt() failed, " \
+ "with code %d (%s)\n", \
+ (Y), (Z), (int)ec, curl_multi_strerror(ec)); \
+ res = (int)ec; \
+ } \
} WHILE_FALSE
#define res_multi_setopt(A,B,C) \
- exe_multi_setopt((A),(B),(C),(__FILE__),(__LINE__))
+ exe_multi_setopt((A), (B), (C), (__FILE__), (__LINE__))
-#define chk_multi_setopt(A,B,C,Y,Z) do { \
- exe_multi_setopt((A),(B),(C),(Y),(Z)); \
- if(res) \
- goto test_cleanup; \
+#define chk_multi_setopt(A,B,C,Y,Z) do { \
+ exe_multi_setopt((A), (B), (C), (Y), (Z)); \
+ if(res) \
+ goto test_cleanup; \
} WHILE_FALSE
#define multi_setopt(A,B,C) \
- chk_multi_setopt((A),(B),(C),(__FILE__),(__LINE__))
+ chk_multi_setopt((A), (B), (C), (__FILE__), (__LINE__))
/* ---------------------------------------------------------------- */
#define exe_multi_add_handle(A,B,Y,Z) do { \
CURLMcode ec; \
- if((ec = curl_multi_add_handle((A),(B))) != CURLM_OK) { \
+ if((ec = curl_multi_add_handle((A), (B))) != CURLM_OK) { \
fprintf(stderr, "%s:%d curl_multi_add_handle() failed, " \
"with code %d (%s)\n", \
(Y), (Z), (int)ec, curl_multi_strerror(ec)); \
@@ -226,23 +224,23 @@ extern int unitfail;
} \
} WHILE_FALSE
-#define res_multi_add_handle(A,B) \
- exe_multi_add_handle((A),(B),(__FILE__),(__LINE__))
+#define res_multi_add_handle(A, B) \
+ exe_multi_add_handle((A), (B), (__FILE__), (__LINE__))
-#define chk_multi_add_handle(A,B,Y,Z) do { \
- exe_multi_add_handle((A),(B),(Y),(Z)); \
- if(res) \
- goto test_cleanup; \
+#define chk_multi_add_handle(A, B, Y, Z) do { \
+ exe_multi_add_handle((A), (B), (Y), (Z)); \
+ if(res) \
+ goto test_cleanup; \
} WHILE_FALSE
-#define multi_add_handle(A,B) \
- chk_multi_add_handle((A),(B),(__FILE__),(__LINE__))
+#define multi_add_handle(A, B) \
+ chk_multi_add_handle((A), (B), (__FILE__), (__LINE__))
/* ---------------------------------------------------------------- */
#define exe_multi_remove_handle(A,B,Y,Z) do { \
CURLMcode ec; \
- if((ec = curl_multi_remove_handle((A),(B))) != CURLM_OK) { \
+ if((ec = curl_multi_remove_handle((A), (B))) != CURLM_OK) { \
fprintf(stderr, "%s:%d curl_multi_remove_handle() failed, " \
"with code %d (%s)\n", \
(Y), (Z), (int)ec, curl_multi_strerror(ec)); \
@@ -250,24 +248,24 @@ extern int unitfail;
} \
} WHILE_FALSE
-#define res_multi_remove_handle(A,B) \
- exe_multi_remove_handle((A),(B),(__FILE__),(__LINE__))
+#define res_multi_remove_handle(A, B) \
+ exe_multi_remove_handle((A), (B), (__FILE__), (__LINE__))
-#define chk_multi_remove_handle(A,B,Y,Z) do { \
- exe_multi_remove_handle((A),(B),(Y),(Z)); \
- if(res) \
- goto test_cleanup; \
+#define chk_multi_remove_handle(A, B, Y, Z) do { \
+ exe_multi_remove_handle((A), (B), (Y), (Z)); \
+ if(res) \
+ goto test_cleanup; \
} WHILE_FALSE
-#define multi_remove_handle(A,B) \
- chk_multi_remove_handle((A),(B),(__FILE__),(__LINE__))
+#define multi_remove_handle(A, B) \
+ chk_multi_remove_handle((A), (B), (__FILE__), (__LINE__))
/* ---------------------------------------------------------------- */
#define exe_multi_perform(A,B,Y,Z) do { \
CURLMcode ec; \
- if((ec = curl_multi_perform((A),(B))) != CURLM_OK) { \
+ if((ec = curl_multi_perform((A), (B))) != CURLM_OK) { \
fprintf(stderr, "%s:%d curl_multi_perform() failed, " \
"with code %d (%s)\n", \
(Y), (Z), (int)ec, curl_multi_strerror(ec)); \
@@ -281,53 +279,53 @@ extern int unitfail;
} \
} WHILE_FALSE
-#define res_multi_perform(A,B) \
- exe_multi_perform((A),(B),(__FILE__),(__LINE__))
+#define res_multi_perform(A, B) \
+ exe_multi_perform((A), (B), (__FILE__), (__LINE__))
-#define chk_multi_perform(A,B,Y,Z) do { \
- exe_multi_perform((A),(B),(Y),(Z)); \
- if(res) \
- goto test_cleanup; \
+#define chk_multi_perform(A, B, Y, Z) do { \
+ exe_multi_perform((A), (B), (Y), (Z)); \
+ if(res) \
+ goto test_cleanup; \
} WHILE_FALSE
#define multi_perform(A,B) \
- chk_multi_perform((A),(B),(__FILE__),(__LINE__))
+ chk_multi_perform((A), (B), (__FILE__), (__LINE__))
/* ---------------------------------------------------------------- */
-#define exe_multi_fdset(A,B,C,D,E,Y,Z) do { \
- CURLMcode ec; \
- if((ec = curl_multi_fdset((A),(B),(C),(D),(E))) != CURLM_OK) { \
- fprintf(stderr, "%s:%d curl_multi_fdset() failed, " \
- "with code %d (%s)\n", \
- (Y), (Z), (int)ec, curl_multi_strerror(ec)); \
- res = (int)ec; \
- } \
- else if(*((E)) < -1) { \
- fprintf(stderr, "%s:%d curl_multi_fdset() succeeded, " \
- "but returned invalid max_fd value (%d)\n", \
- (Y), (Z), (int)*((E))); \
- res = TEST_ERR_NUM_HANDLES; \
- } \
+#define exe_multi_fdset(A, B, C, D, E, Y, Z) do { \
+ CURLMcode ec; \
+ if((ec = curl_multi_fdset((A), (B), (C), (D), (E))) != CURLM_OK) { \
+ fprintf(stderr, "%s:%d curl_multi_fdset() failed, " \
+ "with code %d (%s)\n", \
+ (Y), (Z), (int)ec, curl_multi_strerror(ec)); \
+ res = (int)ec; \
+ } \
+ else if(*((E)) < -1) { \
+ fprintf(stderr, "%s:%d curl_multi_fdset() succeeded, " \
+ "but returned invalid max_fd value (%d)\n", \
+ (Y), (Z), (int)*((E))); \
+ res = TEST_ERR_NUM_HANDLES; \
+ } \
} WHILE_FALSE
-#define res_multi_fdset(A,B,C,D,E) \
- exe_multi_fdset((A),(B),(C),(D),(E),(__FILE__),(__LINE__))
+#define res_multi_fdset(A, B, C, D, E) \
+ exe_multi_fdset((A), (B), (C), (D), (E), (__FILE__), (__LINE__))
-#define chk_multi_fdset(A,B,C,D,E,Y,Z) do { \
- exe_multi_fdset((A),(B),(C),(D),(E),(Y),(Z)); \
- if(res) \
- goto test_cleanup; \
-} WHILE_FALSE
+#define chk_multi_fdset(A, B, C, D, E, Y, Z) do { \
+ exe_multi_fdset((A), (B), (C), (D), (E), (Y), (Z)); \
+ if(res) \
+ goto test_cleanup; \
+ } WHILE_FALSE
-#define multi_fdset(A,B,C,D,E) \
- chk_multi_fdset((A),(B),(C),(D),(E),(__FILE__),(__LINE__))
+#define multi_fdset(A, B, C, D, E) \
+ chk_multi_fdset((A), (B), (C), (D), (E), (__FILE__), (__LINE__))
/* ---------------------------------------------------------------- */
#define exe_multi_timeout(A,B,Y,Z) do { \
CURLMcode ec; \
- if((ec = curl_multi_timeout((A),(B))) != CURLM_OK) { \
+ if((ec = curl_multi_timeout((A), (B))) != CURLM_OK) { \
fprintf(stderr, "%s:%d curl_multi_timeout() failed, " \
"with code %d (%s)\n", \
(Y), (Z), (int)ec, curl_multi_strerror(ec)); \
@@ -341,42 +339,42 @@ extern int unitfail;
} \
} WHILE_FALSE
-#define res_multi_timeout(A,B) \
- exe_multi_timeout((A),(B),(__FILE__),(__LINE__))
+#define res_multi_timeout(A, B) \
+ exe_multi_timeout((A), (B), (__FILE__), (__LINE__))
-#define chk_multi_timeout(A,B,Y,Z) do { \
- exe_multi_timeout((A),(B),(Y),(Z)); \
- if(res) \
- goto test_cleanup; \
-} WHILE_FALSE
+#define chk_multi_timeout(A, B, Y, Z) do { \
+ exe_multi_timeout((A), (B), (Y), (Z)); \
+ if(res) \
+ goto test_cleanup; \
+ } WHILE_FALSE
-#define multi_timeout(A,B) \
- chk_multi_timeout((A),(B),(__FILE__),(__LINE__))
+#define multi_timeout(A, B) \
+ chk_multi_timeout((A), (B), (__FILE__), (__LINE__))
/* ---------------------------------------------------------------- */
-#define exe_select_test(A,B,C,D,E,Y,Z) do { \
- int ec; \
- if(select_wrapper((A),(B),(C),(D),(E)) == -1 ) { \
- ec = SOCKERRNO; \
- fprintf(stderr, "%s:%d select() failed, with " \
- "errno %d (%s)\n", \
- (Y), (Z), ec, strerror(ec)); \
- res = TEST_ERR_SELECT; \
- } \
-} WHILE_FALSE
-
-#define res_select_test(A,B,C,D,E) \
- exe_select_test((A),(B),(C),(D),(E),(__FILE__),(__LINE__))
-
-#define chk_select_test(A,B,C,D,E,Y,Z) do { \
- exe_select_test((A),(B),(C),(D),(E),(Y),(Z)); \
- if(res) \
- goto test_cleanup; \
-} WHILE_FALSE
-
-#define select_test(A,B,C,D,E) \
- chk_select_test((A),(B),(C),(D),(E),(__FILE__),(__LINE__))
+#define exe_select_test(A, B, C, D, E, Y, Z) do { \
+ int ec; \
+ if(select_wrapper((A), (B), (C), (D), (E)) == -1) { \
+ ec = SOCKERRNO; \
+ fprintf(stderr, "%s:%d select() failed, with " \
+ "errno %d (%s)\n", \
+ (Y), (Z), ec, strerror(ec)); \
+ res = TEST_ERR_SELECT; \
+ } \
+ } WHILE_FALSE
+
+#define res_select_test(A, B, C, D, E) \
+ exe_select_test((A), (B), (C), (D), (E), (__FILE__), (__LINE__))
+
+#define chk_select_test(A, B, C, D, E, Y, Z) do { \
+ exe_select_test((A), (B), (C), (D), (E), (Y), (Z)); \
+ if(res) \
+ goto test_cleanup; \
+ } WHILE_FALSE
+
+#define select_test(A, B, C, D, E) \
+ chk_select_test((A), (B), (C), (D), (E), (__FILE__), (__LINE__))
/* ---------------------------------------------------------------- */
@@ -393,16 +391,16 @@ extern int unitfail;
} WHILE_FALSE
#define res_test_timedout() \
- exe_test_timedout((__FILE__),(__LINE__))
+ exe_test_timedout((__FILE__), (__LINE__))
-#define chk_test_timedout(Y,Z) do { \
- exe_test_timedout(Y,Z); \
- if(res) \
- goto test_cleanup; \
-} WHILE_FALSE
+#define chk_test_timedout(Y, Z) do { \
+ exe_test_timedout(Y, Z); \
+ if(res) \
+ goto test_cleanup; \
+ } WHILE_FALSE
#define abort_on_test_timeout() \
- chk_test_timedout((__FILE__),(__LINE__))
+ chk_test_timedout((__FILE__), (__LINE__))
/* ---------------------------------------------------------------- */
@@ -417,18 +415,18 @@ extern int unitfail;
} WHILE_FALSE
#define res_global_init(A) \
- exe_global_init((A),(__FILE__),(__LINE__))
+ exe_global_init((A), (__FILE__), (__LINE__))
-#define chk_global_init(A,Y,Z) do { \
- exe_global_init((A),(Y),(Z)); \
- if(res) \
- return res; \
-} WHILE_FALSE
+#define chk_global_init(A, Y, Z) do { \
+ exe_global_init((A), (Y), (Z)); \
+ if(res) \
+ return res; \
+ } WHILE_FALSE
/* global_init() is different than other macros. In case of
failure it 'return's instead of going to 'test_cleanup'. */
#define global_init(A) \
- chk_global_init((A),(__FILE__),(__LINE__))
+ chk_global_init((A), (__FILE__), (__LINE__))
/* ---------------------------------------------------------------- */
diff --git a/tests/libtest/testtrace.c b/tests/libtest/testtrace.c
index 8d9c6b81..958719f6 100644
--- a/tests/libtest/testtrace.c
+++ b/tests/libtest/testtrace.c
@@ -9,7 +9,7 @@
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/testtrace.h b/tests/libtest/testtrace.h
index 73d2489a..fafdf299 100644
--- a/tests/libtest/testtrace.h
+++ b/tests/libtest/testtrace.h
@@ -11,7 +11,7 @@
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
diff --git a/tests/libtest/testutil.c b/tests/libtest/testutil.c
index b18a6073..b9c43de0 100644
--- a/tests/libtest/testutil.c
+++ b/tests/libtest/testutil.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -20,7 +20,7 @@
*
***************************************************************************/
#include "curl_setup.h"
-
+#include <curl/curl.h>
#include "testutil.h"
#include "memdebug.h"
diff --git a/tests/libtest/testutil.h b/tests/libtest/testutil.h
index a236970a..0bc5e03b 100644
--- a/tests/libtest/testutil.h
+++ b/tests/libtest/testutil.h
@@ -11,7 +11,7 @@
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is