summaryrefslogtreecommitdiff
path: root/docs/examples/threaded-ssl.c
diff options
context:
space:
mode:
Diffstat (limited to 'docs/examples/threaded-ssl.c')
-rw-r--r--docs/examples/threaded-ssl.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/docs/examples/threaded-ssl.c b/docs/examples/threaded-ssl.c
index adf46292a..522f8c49a 100644
--- a/docs/examples/threaded-ssl.c
+++ b/docs/examples/threaded-ssl.c
@@ -135,7 +135,6 @@ int main(int argc, char **argv)
{
pthread_t tid[NUMT];
int i;
- int error;
(void)argc; /* we don't use any arguments in this example */
(void)argv;
@@ -145,10 +144,10 @@ int main(int argc, char **argv)
init_locks();
for(i = 0; i< NUMT; i++) {
- error = pthread_create(&tid[i],
- NULL, /* default attributes please */
- pull_one_url,
- (void *)urls[i]);
+ int error = pthread_create(&tid[i],
+ NULL, /* default attributes please */
+ pull_one_url,
+ (void *)urls[i]);
if(0 != error)
fprintf(stderr, "Couldn't run thread number %d, errno %d\n", i, error);
else
@@ -157,7 +156,7 @@ int main(int argc, char **argv)
/* now wait for all threads to terminate */
for(i = 0; i< NUMT; i++) {
- error = pthread_join(tid[i], NULL);
+ pthread_join(tid[i], NULL);
fprintf(stderr, "Thread %d terminated\n", i);
}