From: Mike Frysinger <vapier@gentoo.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/2] disk: part_efi: fix **pgpt_pte == NULL
Date: Wed, 19 Oct 2011 14:21:23 -0400 [thread overview]
Message-ID: <201110191421.24193.vapier@gentoo.org> (raw)
In-Reply-To: <1319047487-9926-2-git-send-email-dianders@chromium.org>
On Wednesday 19 October 2011 14:04:47 Doug Anderson wrote:
> - debug("%s: gpt-entry at 0x%08X\n", __func__, (unsigned int)*pgpt_pte);
> + debug("%s: gpt-entry at 0x%p\n", __func__, gpt_pte);
i like %x->%p, but i think this change is incorrect. doesn't %p output a
leading 0x already ?
> /* Remember to free pte */
> - if (*pgpt_pte != NULL) {
> - debug("%s: Freeing pgpt_pte\n", __func__);
> - free(*pgpt_pte);
> + if (gpt_pte != NULL) {
> + debug("%s: Freeing gpt_pte\n", __func__);
> + free(gpt_pte);
> }
useless if() check. free(NULL) works fine. change it to always call free().
there are a few more like this below.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20111019/069dd85b/attachment.pgp
next prev parent reply other threads:[~2011-10-19 18:21 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-19 18:04 [U-Boot] [PATCH 1/2] cosmetic: Replace __FUNCTION__ with __func__ in part_efi.c Doug Anderson
2011-10-19 18:04 ` [U-Boot] [PATCH 2/2] disk: part_efi: fix **pgpt_pte == NULL Doug Anderson
2011-10-19 18:21 ` Mike Frysinger [this message]
2011-10-19 19:47 ` Doug Anderson
2011-10-19 19:56 ` Mike Frysinger
2011-10-19 19:59 ` Doug Anderson
2011-10-19 20:29 ` Mike Frysinger
2011-10-27 21:50 ` Wolfgang Denk
2011-10-19 19:33 ` Richard Retanubun
2011-10-19 18:19 ` [U-Boot] [PATCH 1/2] cosmetic: Replace __FUNCTION__ with __func__ in part_efi.c Mike Frysinger
2011-10-19 19:24 ` Richard Retanubun
2011-10-27 21:46 ` Wolfgang Denk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201110191421.24193.vapier@gentoo.org \
--to=vapier@gentoo.org \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox