From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Denk Date: Tue, 30 Oct 2012 20:04:40 +0100 Subject: [U-Boot] [PATCH] cmd_fdt.c: Use %p when printing pointers In-Reply-To: References: <1351558398-6902-1-git-send-email-trini@ti.com> <20121030095927.437502001B0@gemini.denx.de> Message-ID: <20121030190440.72C352005D3@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Joe, In message you wrote: > > > 1) Handle this locally, say like that: ... > I think this solution is not needed. In this particular case, we are > always printing the pointer to a member inside the fdt, so even if the > image is at 0, no pointer that we are printing will ever be at 0. > Therefore this is code that will never run and can be left out. If we would decide for this variant, such reasoning should be explained in a comment. > > Would anybody shed any tears if we drop this? > > Getting rid of this would be good in general IMO. I never did > understand why printing "(null)" was better than "0". I guess for the same reasons we are forced^W encouraged to write NULL instead of 0 . In the standard C library it certainly makes sense to note specifically if one tries to dereference a NULL pointer, because this is aways a bug. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de I have never understood the female capacity to avoid a direct answer to any question. -- Spock, "This Side of Paradise", stardate 3417.3