public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/3] common/cmd_ximg.c: add ifdef protection for gzip uncompression
Date: Mon, 23 May 2011 23:10:45 -0400	[thread overview]
Message-ID: <201105232310.46256.vapier@gentoo.org> (raw)
In-Reply-To: <1306175353-2983-3-git-send-email-msm@freescale.com>

On Monday, May 23, 2011 14:29:13 Matthew McClintock wrote:
> --- a/common/cmd_ximg.c
> +++ b/common/cmd_ximg.c
>  			break;
>  		case IH_COMP_GZIP:
> +#ifdef CONFIG_GZIP
>  			printf ("   Uncompressing part %d ... ", part);
>  			if (gunzip ((void *) dest, unc_len,
>  				    (uchar *) data, &len) != 0) {
>  				puts ("GUNZIP ERROR - image not loaded\n");
>  				return 1;
>  			}
> +#else
> +			printf("    gzip decompression not supported in this"
> +				" build!\n");
> +			return 1;
> +#endif

a few things ...
 - dont split string constants
 - if you arent using any formats, then puts() is better
 - the #else isnt even necessary ... wrap the "case" in the #ifdef too, and 
then at runtime this will automatically fall through to the already existing 
default: case
-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/20110523/885b6143/attachment.pgp 

  reply	other threads:[~2011-05-24  3:10 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-23 18:29 [U-Boot] [PATCH 1/3] disk/part.c: Make features optional Matthew McClintock
2011-05-23 18:29 ` [U-Boot] [PATCH 2/3] common/cmd_nand.c: add ifdef protection for do_bootm Matthew McClintock
2011-05-23 18:29   ` [U-Boot] [PATCH 3/3] common/cmd_ximg.c: add ifdef protection for gzip uncompression Matthew McClintock
2011-05-24  3:10     ` Mike Frysinger [this message]
2011-05-24 15:48       ` [U-Boot] [PATCH v2 " Matthew McClintock
2011-07-26 12:28         ` Wolfgang Denk
2011-05-24  3:12   ` [U-Boot] [PATCH 2/3] common/cmd_nand.c: add ifdef protection for do_bootm Mike Frysinger
2011-05-24 15:47     ` [U-Boot] [PATCH v2 " Matthew McClintock
2011-06-01 15:10       ` Mike Frysinger
2011-06-01 15:55         ` McClintock Matthew-B29882
2011-06-01 16:59           ` Mike Frysinger
2011-06-01 17:58             ` McClintock Matthew-B29882
2011-06-01 17:56         ` Scott Wood
2011-06-01 19:21         ` Wolfgang Denk
2011-06-02 14:56           ` Mike Frysinger
2011-05-23 21:21 ` [U-Boot] [PATCH 1/3] disk/part.c: Make features optional Kumar Gala
2011-05-23 21:49   ` [U-Boot] [PATCH v2 " Matthew McClintock
2011-05-24  3:08     ` Mike Frysinger
2011-05-24 15:31       ` [U-Boot] [PATCH v3 " Matthew McClintock

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=201105232310.46256.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