otherwise the value would be uninitialised in the unlikely
case of being called with length 0.
-/* $OpenBSD: sdmmc_mem.c,v 1.20 2014/09/23 12:08:13 rapha Exp $ */
+/* $OpenBSD: sdmmc_mem.c,v 1.21 2015/04/22 04:02:06 jsg Exp $ */
/*
* Copyright (c) 2006 Uwe Stuehler <uwe@openbsd.org>
sdmmc_mem_single_read_block(struct sdmmc_function *sf, int blkno, u_char *data,
size_t datalen)
{
- int error;
+ int error = 0;
int i;
for (i = 0; i < datalen / sf->csd.sector_size; i++) {
sdmmc_mem_single_write_block(struct sdmmc_function *sf, int blkno, u_char *data,
size_t datalen)
{
- int error;
+ int error = 0;
int i;
for (i = 0; i < datalen / sf->csd.sector_size; i++) {