From a35d9f1a676f430e1dbbb555f327cd7a40df37f7 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Fri, 12 Sep 2008 22:43:10 +0000 Subject: * cygcheck.cc (pathlike::check_existence): Remove class name from declaration. (display_internet_error): Use proper format specifier for DWORD. (environ): Remove unneeded declaration. (main): Use brace around nested if to avoid an overly-helpful compiler warning. * dump_setup.cc (parse_filename): Reorganize nested if to avoid an overly-helpful compiler warning. * path.cc (GUID_shortcut): Use braces around part of initializer which needs them. (conv_fstab_spaces): Parenthesize assignment in while loop to avoid a compiler warning. (struct opt): Make static. * ps.cc (main): Reorganize nested if to avoid an overly-helpful compiler warning. * regtool.cc: Make some anonymous structs static to avoid a compiler warning. * ssp.c (lookup_thread_id): Initialize *tix to zero to avoid potential uninitialized use. * strace.cc (add_child): Use proper format specifier for DWORD. (remove_child): Ditto. (proc_child): Ditto. --- winsup/utils/ps.cc | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'winsup/utils/ps.cc') diff --git a/winsup/utils/ps.cc b/winsup/utils/ps.cc index 091e7413a..2ad2a39a5 100644 --- a/winsup/utils/ps.cc +++ b/winsup/utils/ps.cc @@ -344,14 +344,15 @@ main (int argc, char *argv[]) if ((proc_id > 0) && (p->pid != proc_id)) continue; - if (!aflag) - if (p->version >= EXTERNAL_PINFO_VERSION_32_BIT) - { - if (p->uid32 != (__uid32_t) uid) - continue; - } - else if (p->uid != uid) - continue; + if (aflag) + /* nothing to do */; + else if (p->version >= EXTERNAL_PINFO_VERSION_32_BIT) + { + if (p->uid32 != (__uid32_t) uid) + continue; + } + else if (p->uid != uid) + continue; char status = ' '; if (p->process_state & PID_STOPPED) status = 'S'; -- cgit v1.2.3