From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Frysinger Date: Sun, 21 Aug 2011 21:09:47 -0400 Subject: [U-Boot] [PATCH] new tool mkenvimage: generates an env image from an arbitrary config file In-Reply-To: <1312885889-20222-1-git-send-email-david.wagner@free-electrons.com> References: <1312555798-29542-1-git-send-email-david.wagner@free-electrons.com> <1312885889-20222-1-git-send-email-david.wagner@free-electrons.com> Message-ID: <201108212109.48533.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 Tuesday, August 09, 2011 06:31:29 David Wagner wrote: > +extern uint32_t crc32 (uint32_t, const unsigned char *, unsigned int); does including u-boot/crc.h work ? > +static void usage(char *exec_name) const char *exec_name > + char *txt_filename = NULL, *bin_filename = NULL; mark them both const ? > + dataptr = calloc(datasize, sizeof(*dataptr)); you zero-ed it out here ... > + /* Pad the environnment with the padding byte */ > + memset(envptr, padbyte, envsize); ... then manually filled it with a byte. just use malloc() instead of calloc() and avoid that zero. > + memcpy((uint32_t*) dataptr, &targetendian_crc, sizeof(uint32_t)); i dont think that cast is necessary. just punt it. -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/20110821/d79e0d6e/attachment.pgp