* strace.cc (strace::vsprntf): Avoid accessing myself->pid if !myself.

This commit is contained in:
Christopher Faylor 2005-09-22 17:06:48 +00:00
parent 7e7a719a8e
commit 378017d7c2
2 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2005-09-22 Christopher Faylor <cgf@timesys.com>
* strace.cc (strace::vsprntf): Avoid accessing myself->pid if !myself.
2005-09-22 Christopher Faylor <cgf@timesys.com>
* include/sys/strace.h (_STRACE_ON): Remove semicolon from definition.

View File

@ -149,7 +149,7 @@ strace::vsprntf (char *buf, const char *func, const char *infmt, va_list ap)
*p = '\000';
p = progname;
count = __small_sprintf (buf, fmt, p && *p ? p : "?",
myself->pid ?: GetCurrentProcessId (),
myself ? myself->pid : GetCurrentProcessId (),
execing ? "!" : "");
if (func)
count += getfunc (buf + count, func);