diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2012-01-23 13:35:22 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2012-01-23 13:35:22 +0000 |
commit | a71b5a3812de2a9da03eb91bc31df306f28c3d11 (patch) | |
tree | 359b132793cda58e7100cc8d9e660a45e4a4be48 /gdb/linux-tdep.c | |
parent | d12c31dfa70fad2a5e062d93d0c7e55818fe725e (diff) | |
download | gdb-a71b5a3812de2a9da03eb91bc31df306f28c3d11.zip gdb-a71b5a3812de2a9da03eb91bc31df306f28c3d11.tar.gz gdb-a71b5a3812de2a9da03eb91bc31df306f28c3d11.tar.bz2 |
* inf-child.c: Include "gdb_stat.h" instead of <sys/stat.h>.
* linux-tdep.c (linux_info_proc): Avoid ARI coding style warning.
* target.c (target_fileio_pwrite): Remove buffer address from
debug output.
(target_fileio_pread): Likewise.
Diffstat (limited to 'gdb/linux-tdep.c')
-rw-r--r-- | gdb/linux-tdep.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/gdb/linux-tdep.c b/gdb/linux-tdep.c index 421518a..3ab98c7 100644 --- a/gdb/linux-tdep.c +++ b/gdb/linux-tdep.c @@ -402,7 +402,6 @@ linux_info_proc (struct gdbarch *gdbarch, char *args, { struct cleanup *cleanup = make_cleanup (xfree, data); const char *p = data; - const char *ep; ULONGEST val; printf_filtered (_("Process: %s\n"), @@ -410,10 +409,15 @@ linux_info_proc (struct gdbarch *gdbarch, char *args, while (*p && isspace (*p)) p++; - if (*p == '(' && (ep = strchr (p, ')')) != NULL) + if (*p == '(') { - printf_filtered ("Exec file: %.*s\n", (int) (ep - p - 1), p + 1); - p = ep + 1; + const char *ep = strchr (p, ')'); + if (ep != NULL) + { + printf_filtered ("Exec file: %.*s\n", + (int) (ep - p - 1), p + 1); + p = ep + 1; + } } while (*p && isspace (*p)) |