[TSAN] main: Stop calling g_set_prgname()
authorColin Walters <walters@verbum.org>
Thu, 17 Nov 2016 16:39:27 +0000 (11:39 -0500)
committerAtomic Bot <atomic-devel@projectatomic.io>
Thu, 17 Nov 2016 19:41:57 +0000 (19:41 +0000)
It turns out this is basically racy with the presence of other
threads.  It was really cosmetic so let's stop doing it and make
`-fsanitize=thread` happy.

Closes: #582
Approved by: jlebon

src/ostree/ot-main.c

index 5080e8c61291438fde50c0badcc583823581388e..0d0587f2872f5dc01433da01617227a0ff43d987 100644 (file)
@@ -125,7 +125,6 @@ ostree_run (int    argc,
   GError *error = NULL;
   GCancellable *cancellable = NULL;
   const char *command_name = NULL;
-  g_autofree char *prgname = NULL;
   gboolean success = FALSE;
   int in, out;
 
@@ -202,10 +201,6 @@ ostree_run (int    argc,
       goto out;
     }
 
-  prgname = g_strdup_printf ("%s %s", g_get_prgname (), command_name);
-  g_set_prgname (prgname);
-
-  
   if (!command->fn (argc, argv, cancellable, &error))
     goto out;