Add build system
[zfs.git] / lib / libzfs / libzfs_diff.c
index 4614526..5b3f934 100644 (file)
@@ -90,7 +90,7 @@ static int
 get_stats_for_obj(differ_info_t *di, const char *dsname, uint64_t obj,
     char *pn, int maxlen, zfs_stat_t *sb)
 {
-       zfs_cmd_t zc = { 0 };
+       zfs_cmd_t zc = { "\0", "\0", "\0", "\0", 0 };
        int error;
 
        (void) strlcpy(zc.zc_name, dsname, sizeof (zc.zc_name));
@@ -346,7 +346,7 @@ write_inuse_diffs(FILE *fp, differ_info_t *di, dmu_diff_record_t *dr)
        int err;
 
        for (o = dr->ddr_first; o <= dr->ddr_last; o++) {
-               if (err = write_inuse_diffs_one(fp, di, o))
+               if ((err = write_inuse_diffs_one(fp, di, o)))
                        return (err);
        }
        return (0);
@@ -375,7 +375,7 @@ describe_free(FILE *fp, differ_info_t *di, uint64_t object, char *namebuf,
 static int
 write_free_diffs(FILE *fp, differ_info_t *di, dmu_diff_record_t *dr)
 {
-       zfs_cmd_t zc = { 0 };
+       zfs_cmd_t zc = { "\0", "\0", "\0", "\0", 0 };
        libzfs_handle_t *lhdl = di->zhp->zfs_hdl;
        char fobjname[MAXPATHLEN];
 
@@ -503,7 +503,7 @@ static int
 make_temp_snapshot(differ_info_t *di)
 {
        libzfs_handle_t *hdl = di->zhp->zfs_hdl;
-       zfs_cmd_t zc = { 0 };
+       zfs_cmd_t zc = { "\0", "\0", "\0", "\0", 0 };
 
        (void) snprintf(zc.zc_value, sizeof (zc.zc_value),
            ZDIFF_PREFIX, getpid());
@@ -745,7 +745,7 @@ int
 zfs_show_diffs(zfs_handle_t *zhp, int outfd, const char *fromsnap,
     const char *tosnap, int flags)
 {
-       zfs_cmd_t zc = { 0 };
+       zfs_cmd_t zc = { "\0", "\0", "\0", "\0", 0 };
        char errbuf[1024];
        differ_info_t di = { 0 };
        pthread_t tid;