]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Minor cleanup in linux_proc_attach_tgid_threads
authorTom Tromey <tromey@adacore.com>
Thu, 7 Sep 2023 15:03:43 +0000 (09:03 -0600)
committerTom Tromey <tromey@adacore.com>
Fri, 1 Dec 2023 17:36:00 +0000 (10:36 -0700)
linux_proc_attach_tgid_threads computes a file name, and then
re-computes it for a warning.  It is better to reuse the
already-computed name here.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
gdb/nat/linux-procfs.c

index 9c2d1beb91faa8d2900d270ea1dcbd995f9b4bd6..95ecae443e47daf8cdf477fa104e7e07f9397e4a 100644 (file)
@@ -287,7 +287,7 @@ linux_proc_attach_tgid_threads (pid_t pid,
   dir = opendir (pathname);
   if (dir == NULL)
     {
-      warning (_("Could not open /proc/%ld/task."), (long) pid);
+      warning (_("Could not open %s."), pathname);
       return;
     }