X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fperl.c;h=d760b4179430796002dab545892aafc723df98f6;hb=a396da422740caf336a6d594515e8d80de6f440a;hp=cdacbb7795ec0060ae24dca4d797d47b99dc28a6;hpb=61a4ed99b1a5b6d371bb745933d0efc5dff9505c;p=collectd.git diff --git a/src/perl.c b/src/perl.c index cdacbb77..d760b417 100644 --- a/src/perl.c +++ b/src/perl.c @@ -183,17 +183,17 @@ extern char **environ; * private variables */ -static bool register_legacy_flush = 1; +static bool register_legacy_flush = true; /* if perl_threads != NULL perl_threads->head must * point to the "base" thread */ -static c_ithread_list_t *perl_threads = NULL; +static c_ithread_list_t *perl_threads; /* the key used to store each pthread's ithread */ static pthread_key_t perl_thr_key; static int perl_argc = 0; -static char **perl_argv = NULL; +static char **perl_argv; static char base_name[DATA_MAX_NAME_LEN] = ""; @@ -989,7 +989,7 @@ static int call_pv_locked(pTHX_ const char *sub_name) { return 0; old_running = t->running; - t->running = 1; + t->running = true; if (t->shutdown) { t->running = old_running; @@ -1189,7 +1189,7 @@ static void c_ithread_destroy(c_ithread_t *ithread) { /* Mark as running to avoid deadlock: c_ithread_destroy -> log_debug -> perl_log() */ - ithread->running = 1; + ithread->running = true; log_debug("Shutting down Perl interpreter %p...", aTHX); #if COLLECT_DEBUG @@ -1275,8 +1275,8 @@ static c_ithread_t *c_ithread_create(PerlInterpreter *base) { } t->pthread = pthread_self(); - t->running = 0; - t->shutdown = 0; + t->running = false; + t->shutdown = false; perl_threads->tail = t; pthread_setspecific(perl_thr_key, (const void *)t); @@ -2276,7 +2276,7 @@ static int perl_shutdown(void) { * the thread as this will free the memory */ t = t->prev; - thr->shutdown = 1; + thr->shutdown = true; if (thr->running) { /* Give some time to thread to exit from Perl interpreter */ WARNING("perl shutdown: Thread is running inside Perl. Waiting.");