diff options
author | Dmitry Antipov <dmantipov@yandex.ru> | 2019-12-27 13:35:33 +0300 |
---|---|---|
committer | MOHIT AGRAWAL <moagrawa@redhat.com> | 2020-01-01 14:12:27 +0000 |
commit | 7555ebc629774b95a878678f8ab0946c3bcf2f32 (patch) | |
tree | 85d5c4bf69994e63130b33894cc1b5d1b018d554 /cli | |
parent | 33453ec69af1070dd5e15dd99c14ebb43c4e88c2 (diff) |
cli, libglusterfs: rely on libpthread static initializers
cli-cmd.c: drop cli_cmd_cond_init() because static mutex and
condition variable are initialized with PTHREAD_xxx_INITIALIZERs.
syncop-utils.c: since assignment PTHREAD_xxx_INITIALIZERs are
never failed, a few overengineered bits may be simplified.
Change-Id: Ic4d250a1697047386989f73f058b0abc8b55627b
Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
Updates: bz#1193929
Diffstat (limited to 'cli')
-rw-r--r-- | cli/src/cli-cmd.c | 12 | ||||
-rw-r--r-- | cli/src/cli-cmd.h | 3 | ||||
-rw-r--r-- | cli/src/cli.c | 4 |
3 files changed, 0 insertions, 19 deletions
diff --git a/cli/src/cli-cmd.c b/cli/src/cli-cmd.c index c8a84475b55..af009757e93 100644 --- a/cli/src/cli-cmd.c +++ b/cli/src/cli-cmd.c @@ -232,18 +232,6 @@ out: } int -cli_cmd_cond_init() -{ - pthread_mutex_init(&cond_mutex, NULL); - pthread_cond_init(&cond, NULL); - - pthread_mutex_init(&conn_mutex, NULL); - pthread_cond_init(&conn, NULL); - - return 0; -} - -int cli_cmd_lock() { pthread_mutex_lock(&cond_mutex); diff --git a/cli/src/cli-cmd.h b/cli/src/cli-cmd.h index b6bc5659936..c1c068c7085 100644 --- a/cli/src/cli-cmd.h +++ b/cli/src/cli-cmd.h @@ -102,9 +102,6 @@ int cli_cmd_broadcast_response(int32_t status); int -cli_cmd_cond_init(); - -int cli_cmd_lock(); int diff --git a/cli/src/cli.c b/cli/src/cli.c index fac32d3e9ca..cb425c84bdc 100644 --- a/cli/src/cli.c +++ b/cli/src/cli.c @@ -854,10 +854,6 @@ main(int argc, char *argv[]) if (ret) goto out; - ret = cli_cmd_cond_init(); - if (ret) - goto out; - ret = cli_input_init(&state); if (ret) goto out; |