From e63ff03d07545a1eb054fed00de6bf2741d1ca2f Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Tue, 3 Jun 2014 10:24:00 +0000 Subject: [PATCH] Fix a cppcheck complaint in init_error_log() Superfluous write to 'this_thread'. --- errlog.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/errlog.c b/errlog.c index 96da0daf..33c56bf8 100644 --- a/errlog.c +++ b/errlog.c @@ -1,4 +1,4 @@ -const char errlog_rcs[] = "$Id: errlog.c,v 1.119 2014/06/02 06:19:05 fabiankeil Exp $"; +const char errlog_rcs[] = "$Id: errlog.c,v 1.120 2014/06/02 06:22:20 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/errlog.c,v $ @@ -409,7 +409,7 @@ void init_error_log(const char *prog_name, const char *logfname) *********************************************************************/ static long get_thread_id(void) { - long this_thread = 1; /* was: pthread_t this_thread;*/ + long this_thread; #ifdef __OS2__ PTIB ptib; @@ -434,6 +434,9 @@ static long get_thread_id(void) ulrc = DosGetInfoBlocks(&ptib, NULL); if (ulrc == 0) this_thread = ptib -> tib_ptib2 -> tib2_ultid; +#else + /* Forking instead of threading. */ + this_thread = 1; #endif /* def FEATURE_PTHREAD */ return this_thread; -- 2.39.2