aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgermeier <germeier>2003-01-16 17:37:07 +0000
committergermeier <germeier>2003-01-16 17:37:07 +0000
commitaa4623d90038ed1d63800dce9daa017416a85dc0 (patch)
treea30b25e3e0a2968e80a07fcf928994925bc0bb40
parenta6709d2ded8d82bca472764a7f5453821057d048 (diff)
downloadmpiosh-aa4623d90038ed1d63800dce9daa017416a85dc0.tar.gz
mpiosh-aa4623d90038ed1d63800dce9daa017416a85dc0.tar.bz2
mpiosh-aa4623d90038ed1d63800dce9daa017416a85dc0.zip
initalize newly allocated mpio_t structure with zero to be sure (noted
by Sebastian Kloska, thanks!)
-rw-r--r--libmpio/mpio.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libmpio/mpio.c b/libmpio/mpio.c
index fbf6def..e284872 100644
--- a/libmpio/mpio.c
+++ b/libmpio/mpio.c
@@ -1,6 +1,6 @@
/*
*
- * $Id: mpio.c,v 1.37 2002/11/13 23:05:28 germeier Exp $
+ * $Id: mpio.c,v 1.38 2003/01/16 17:37:07 germeier Exp $
*
* Library for USB MPIO-*
*
@@ -178,6 +178,8 @@ mpio_init_external(mpio_t *m)
} else {
sm->manufacturer=0;
sm->id=0;
+ sm->size=0;
+ sm->chips=0;
}
/* init memory parameters if external memory is found */
@@ -226,6 +228,9 @@ mpio_init(mpio_callback_init_t progress_callback)
return NULL;
}
+
+ /* "just" to be sure */
+ memset(new_mpio, 0, sizeof(mpio_t));
/* Read Version Information */
mpio_io_version_read(new_mpio, new_mpio->version);