diff options
author | Rakesh Pandit <rakesh@tuxera.com> | 2014-03-24 11:04:47 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2014-04-22 14:33:35 +0200 |
commit | 08255d534200ed4e39291332d35db82b4668091b (patch) | |
tree | a1616bfb1afbddf78c9f6b99d59a13fe3e360937 /send-test.c | |
parent | a185d8541a4f9a7a23863277358229b45f091981 (diff) | |
download | btrfs-progs-08255d534200ed4e39291332d35db82b4668091b.tar.gz |
Btrfs-progs: remove unsed pthread attribute objects
Threads always use default attributes in all tools, so pthread
attribute objects and their initializations are of no use. Just pass
NULL as attr attribute to pthread_create for default attributes.
Signed-off-by: Rakesh Pandit <rakesh@tuxera.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'send-test.c')
-rw-r--r-- | send-test.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/send-test.c b/send-test.c index 5f7c311..0e804a2 100644 --- a/send-test.c +++ b/send-test.c @@ -371,7 +371,6 @@ int main(int argc, char **argv) int ret = 0; int subvol_fd; pthread_t t_read; - pthread_attr_t t_attr; void *t_err = NULL; struct recv_args r; @@ -401,13 +400,6 @@ int main(int argc, char **argv) goto out; } - ret = pthread_attr_init(&t_attr); - if (ret < 0) { - fprintf(stderr, "ERROR: pthread init failed. %s\n", - strerror(ret)); - goto out; - } - ret = pipe(pipefd); if (ret < 0) { ret = errno; @@ -415,7 +407,7 @@ int main(int argc, char **argv) goto out; } - ret = pthread_create(&t_read, &t_attr, process_thread, &r); + ret = pthread_create(&t_read, NULL, process_thread, &r); if (ret < 0) { ret = errno; fprintf(stderr, "ERROR: pthread create failed. %s\n", @@ -452,7 +444,6 @@ int main(int argc, char **argv) goto out; } - pthread_attr_destroy(&t_attr); out: return !!ret; } |