aboutsummaryrefslogtreecommitdiffstats
path: root/man3/pthread_create.3
diff options
context:
space:
mode:
Diffstat (limited to 'man3/pthread_create.3')
-rw-r--r--man3/pthread_create.310
1 files changed, 5 insertions, 5 deletions
diff --git a/man3/pthread_create.3 b/man3/pthread_create.3
index 9df8cfcda9..c1c4c2ff51 100644
--- a/man3/pthread_create.3
+++ b/man3/pthread_create.3
@@ -305,7 +305,7 @@ static void *
thread_start(void *arg)
{
struct thread_info *tinfo = arg;
- char *uargv, *p;
+ char *uargv;
printf("Thread %d: top of stack near %p; argv_string=%s\en",
tinfo\->thread_num, &p, tinfo\->argv_string);
@@ -314,7 +314,7 @@ thread_start(void *arg)
if (uargv == NULL)
handle_error("strdup");
- for (p = uargv; *p != \(aq\e0\(aq; p++)
+ for (char *p = uargv; *p != \(aq\e0\(aq; p++)
*p = toupper(*p);
return uargv;
@@ -323,7 +323,7 @@ thread_start(void *arg)
int
main(int argc, char *argv[])
{
- int s, tnum, opt, num_threads;
+ int s, opt, num_threads;
pthread_attr_t attr;
int stack_size;
void *res;
@@ -366,7 +366,7 @@ main(int argc, char *argv[])
/* Create one thread for each command\-line argument */
- for (tnum = 0; tnum < num_threads; tnum++) {
+ for (int tnum = 0; tnum < num_threads; tnum++) {
tinfo[tnum].thread_num = tnum + 1;
tinfo[tnum].argv_string = argv[optind + tnum];
@@ -388,7 +388,7 @@ main(int argc, char *argv[])
/* Now join with each thread, and display its returned value */
- for (tnum = 0; tnum < num_threads; tnum++) {
+ for (int tnum = 0; tnum < num_threads; tnum++) {
s = pthread_join(tinfo[tnum].thread_id, &res);
if (s != 0)
handle_error_en(s, "pthread_join");