Replace some uses of xstrprintf with string_printf
[deliverable/binutils-gdb.git] / gdb / auxv.c
index dda14f2cae7c2ff349961a5848bff65f423095d1..13bf9c390aa30b1fe1d203394c4fc48f7ae5bd1c 100644 (file)
@@ -46,13 +46,11 @@ procfs_xfer_auxv (gdb_byte *readbuf,
                  ULONGEST len,
                  ULONGEST *xfered_len)
 {
-  char *pathname;
   int fd;
   ssize_t l;
 
-  pathname = xstrprintf ("/proc/%d/auxv", inferior_ptid.pid ());
+  std::string pathname = string_printf ("/proc/%d/auxv", inferior_ptid.pid ());
   fd = gdb_open_cloexec (pathname, writebuf != NULL ? O_WRONLY : O_RDONLY, 0);
-  xfree (pathname);
   if (fd < 0)
     return TARGET_XFER_E_IO;
 
This page took 0.030701 seconds and 4 git commands to generate.