+2009-04-20 Denys Vlasenko <dvlasenk@redhat.com>
+
+ * strace.c (printstatsol, printstat_sparc64):
+ Remove NULL/error check for addr parameter.
+ (printoldstat, printstat, printoldstat64):
+ Move NULL/error check for addr parameter
+ so that it happens before printstatsol/printstat_sparc64 calls.
+
2009-04-20 Denys Vlasenko <dvlasenk@redhat.com>
* strace.c (collect_stopped_tcbs): Do not enable/disable signals
{
struct solstat statbuf;
- if (!addr) {
- tprintf("NULL");
- return;
- }
- if (syserror(tcp) || !verbose(tcp)) {
- tprintf("%#lx", addr);
- return;
- }
if (umove(tcp, addr, &statbuf) < 0) {
tprintf("{...}");
return;
{
struct stat_sparc64 statbuf;
- if (!addr) {
- tprintf("NULL");
- return;
- }
- if (syserror(tcp) || !verbose(tcp)) {
- tprintf("%#lx", addr);
- return;
- }
if (umove(tcp, addr, &statbuf) < 0) {
tprintf("{...}");
return;
{
struct stat statbuf;
+ if (!addr) {
+ tprintf("NULL");
+ return;
+ }
+ if (syserror(tcp) || !verbose(tcp)) {
+ tprintf("%#lx", addr);
+ return;
+ }
+
#ifdef LINUXSPARC
if (current_personality == 1) {
printstatsol(tcp, addr);
#endif
#endif /* LINUXSPARC */
- if (!addr) {
- tprintf("NULL");
- return;
- }
- if (syserror(tcp) || !verbose(tcp)) {
- tprintf("%#lx", addr);
- return;
- }
if (umove(tcp, addr, &statbuf) < 0) {
tprintf("{...}");
return;
{
struct stat64 statbuf;
-#ifdef STAT64_SIZE
+#ifdef STAT64_SIZE
(void) sizeof(char[sizeof statbuf == STAT64_SIZE ? 1 : -1]);
#endif
+ if (!addr) {
+ tprintf("NULL");
+ return;
+ }
+ if (syserror(tcp) || !verbose(tcp)) {
+ tprintf("%#lx", addr);
+ return;
+ }
+
#ifdef LINUXSPARC
if (current_personality == 1) {
printstatsol(tcp, addr);
return;
}
-#ifdef SPARC64
+# ifdef SPARC64
else if (current_personality == 2) {
printstat_sparc64(tcp, addr);
return;
}
-#endif
+# endif
#endif /* LINUXSPARC */
- if (!addr) {
- tprintf("NULL");
- return;
- }
- if (syserror(tcp) || !verbose(tcp)) {
- tprintf("%#lx", addr);
- return;
- }
if (umove(tcp, addr, &statbuf) < 0) {
tprintf("{...}");
return;
struct __old_kernel_stat statbuf;
struct stat newstatbuf;
-#ifdef LINUXSPARC
- if (current_personality == 1) {
- printstatsol(tcp, addr);
- return;
- }
-#endif /* LINUXSPARC */
-
if (!addr) {
tprintf("NULL");
return;
tprintf("%#lx", addr);
return;
}
+
+#ifdef LINUXSPARC
+ if (current_personality == 1) {
+ printstatsol(tcp, addr);
+ return;
+ }
+#endif /* LINUXSPARC */
+
if (umove(tcp, addr, &statbuf) < 0) {
tprintf("{...}");
return;