Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Jun 2015 16:44:31 +1000 (EST)
From:      Bruce Evans <brde@optusnet.com.au>
To:        Dimitry Andric <dim@freebsd.org>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org,  svn-src-head@freebsd.org
Subject:   Re: svn commit: r284167 - head/sys/i386/i386
Message-ID:  <20150609162836.C935@besplex.bde.org>
In-Reply-To: <201506082012.t58KCjZX023061@svn.freebsd.org>
References:  <201506082012.t58KCjZX023061@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 8 Jun 2015, Dimitry Andric wrote:

> Log:
>  Merge r283870 from amd64:
>
>  Remove unneeded NULL checks in trap_fatal().
>
>  Since td_name is an array member of struct thread, it can never be NULL,
>  so the check can be removed.  In addition, curproc can never be NULL,
>  so remove the if statement, and splice the two printfs() together.
>
>  While here, remove the u_long cast, and use the correct printf format
>  specifier for curproc->p_pid.
>
>  Requested by:	jhb

Er. I gave a longer review which implicity requested not doing all of
this.  The format was correct (it matched the cast), and the cast was
less wrong than not casting.

Both amd64/trap.c i386/trap.c still print pids portably (by casting
to long) in one place.  They each had 2 unportable printings of pids;
now they each have 3 unportable printings of pids.

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150609162836.C935>