]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
drd: Avoid that Coverity complains about a dead assignment
authorBart Van Assche <bvanassche@acm.org>
Sun, 27 Jan 2013 10:56:04 +0000 (10:56 +0000)
committerBart Van Assche <bvanassche@acm.org>
Sun, 27 Jan 2013 10:56:04 +0000 (10:56 +0000)
Thanks to Florian for reporting this.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13270

drd/drd_cond.c

index 23d7c8e823fdbcb562c436e60f5612f3a606448d..5f4b3fa2b701ac9864895d86ff3c12d30430453e 100644 (file)
@@ -152,8 +152,7 @@ void DRD_(cond_pre_init)(const Addr cond)
 
    p = DRD_(cond_get)(cond);
 
-   if (p)
-   {
+   if (p) {
       CondErrInfo cei = { .tid = DRD_(thread_get_running_tid)(), .cond = cond };
       VG_(maybe_record_error)(VG_(get_running_tid)(),
                               CondErr,
@@ -162,7 +161,7 @@ void DRD_(cond_pre_init)(const Addr cond)
                               &cei);
    }
 
-   p = cond_get_or_allocate(cond);
+   cond_get_or_allocate(cond);
 }
 
 /** Called after pthread_cond_destroy(). */