From 410b65185931a20acd3d7c2371bd62d9c8a7002c Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Tue, 24 Nov 2020 23:34:33 +0100 Subject: [PATCH] Revert "util: Fix helgrind complaint about one-time init" This reverts commit f8c7a43f33d4647c16c4892d56706a14e5d6bf17. Acked-by: Rob Clark Part-of: --- src/util/u_process.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/util/u_process.c b/src/util/u_process.c index 992ed0e718d..9f847d1cc02 100644 --- a/src/util/u_process.c +++ b/src/util/u_process.c @@ -46,8 +46,6 @@ #if defined(__linux__) && defined(HAVE_PROGRAM_INVOCATION_NAME) -#include "debug.h" - static char *path = NULL; static void __freeProgramPath() @@ -68,7 +66,7 @@ __getProgramName() * Strip these arguments out by using the realpath only if it was * a prefix of the invocation name. */ - do_once { + if (!path) { path = realpath("/proc/self/exe", NULL); atexit(__freeProgramPath); }