From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Frysinger Date: Mon, 23 May 2011 23:10:45 -0400 Subject: [U-Boot] [PATCH 3/3] common/cmd_ximg.c: add ifdef protection for gzip uncompression In-Reply-To: <1306175353-2983-3-git-send-email-msm@freescale.com> References: <1306175353-2983-1-git-send-email-msm@freescale.com> <1306175353-2983-2-git-send-email-msm@freescale.com> <1306175353-2983-3-git-send-email-msm@freescale.com> Message-ID: <201105232310.46256.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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