fix initialization of do_sync and sparse variables in dcp
The do_sync variable was not being initialized to zero by default,
which would cause undefined behavior. Also, the sparse variable
was being initialized to zero by default, but it should be a
boolean type based on how the struct was specified.
#include <inttypes.h>
#include <unistd.h>
#include <errno.h>
+#include <stdbool.h>
#include "mpi.h"
#include "libcircle.h"
@@ -90,7 +91,10 @@ int main(int argc, \
mfu_copy_opts->synchronous = 0;
/* By default, don't use sparse file. */
- mfu_copy_opts->sparse = 0;
+ mfu_copy_opts->sparse = false;
+
+ /* By default, we want the sync option off */
+ mfu_copy_opts->do_sync = 0;
int option_index = 0;
static struct option long_options[] = {
