Uemis downloader: minor coding style updates

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2015-09-18 12:35:35 -07:00
parent 69c5e9adc2
commit f7eb6f6b58

View file

@ -80,22 +80,20 @@ static int uemis_convert_base64(char *base64, uint8_t **data)
len = strlen(base64);
datalen = (len / 4 + 1) * 3;
if (datalen < 0x123 + 0x25) {
if (datalen < 0x123 + 0x25)
/* less than header + 1 sample??? */
fprintf(stderr, "suspiciously short data block %d\n", datalen);
}
*data = malloc(datalen);
if (!*data) {
datalen = 0;
fprintf(stderr, "Out of memory\n");
goto bail;
return 0;
}
decode((unsigned char *)base64, *data, len);
if (memcmp(*data, "Dive\01\00\00", 7))
fprintf(stderr, "Missing Dive100 header\n");
bail:
return datalen;
}