diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2012-01-23 13:35:20 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2012-01-23 13:35:20 +0000 |
commit | 247a6fbfda881aa9423535c33a6844616647c3b6 (patch) | |
tree | c04ff1fda4aea04cdb72df8ac9bab885150b549d /gdb/linux-tdep.c | |
parent | e45e48a58cc293da96922eea1c149a98450343ee (diff) | |
download | gdb-247a6fbfda881aa9423535c33a6844616647c3b6.tar.gz |
* 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 421518a89ad..3ab98c700f1 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)) |