From: Ruben Kerkhof Date: Sat, 23 Apr 2016 09:22:00 +0000 (+0200) Subject: perl plugin: remove assignments with no effect X-Git-Tag: collectd-5.6.0~329^2~23 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=779c43bdb245d5d24df1e395e8ec099654045283;p=collectd.git perl plugin: remove assignments with no effect [src/perl.c:2079] -> [src/perl.c:2082]: (performance) Variable 't' is reassigned a value before the old one has been used. --- diff --git a/src/perl.c b/src/perl.c index 920e7b3f..ee0f5410 100644 --- a/src/perl.c +++ b/src/perl.c @@ -2064,9 +2064,8 @@ static int perl_flush (cdtime_t timeout, const char *identifier, static int perl_shutdown (void) { - c_ithread_t *t = NULL; - - int ret = 0; + c_ithread_t *t; + int ret; dTHX; @@ -2076,8 +2075,6 @@ static int perl_shutdown (void) return 0; if (NULL == aTHX) { - t = NULL; - pthread_mutex_lock (&perl_threads->mutex); t = c_ithread_create (perl_threads->head->interp); pthread_mutex_unlock (&perl_threads->mutex);