aboutsummaryrefslogtreecommitdiffstats
path: root/lib/libzfs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libzfs')
-rw-r--r--lib/libzfs/libzfs_dataset.c16
-rw-r--r--lib/libzfs/libzfs_import.c2
-rw-r--r--lib/libzfs/libzfs_mount.c2
-rw-r--r--lib/libzfs/libzfs_pool.c10
-rw-r--r--lib/libzfs/libzfs_sendrecv.c4
-rw-r--r--lib/libzfs/libzfs_util.c12
6 files changed, 23 insertions, 23 deletions
diff --git a/lib/libzfs/libzfs_dataset.c b/lib/libzfs/libzfs_dataset.c
index e0f84af50..72d86590e 100644
--- a/lib/libzfs/libzfs_dataset.c
+++ b/lib/libzfs/libzfs_dataset.c
@@ -1938,9 +1938,9 @@ get_numeric_property(zfs_handle_t *zhp, zfs_prop_t prop, zprop_source_t *src,
* the property is valid for the snapshot's head dataset type.
*/
if (zhp->zfs_type == ZFS_TYPE_SNAPSHOT &&
- !zfs_prop_valid_for_type(prop, zhp->zfs_head_type, B_TRUE)) {
- *val = zfs_prop_default_numeric(prop);
- return (-1);
+ !zfs_prop_valid_for_type(prop, zhp->zfs_head_type, B_TRUE)) {
+ *val = zfs_prop_default_numeric(prop);
+ return (-1);
}
switch (prop) {
@@ -2343,7 +2343,7 @@ zfs_prop_get(zfs_handle_t *zhp, zfs_prop_t prop, char *propbuf, size_t proplen,
strftime(propbuf, proplen, "%a %b %e %k:%M %Y",
&t) == 0)
(void) snprintf(propbuf, proplen, "%llu",
- (u_longlong_t) val);
+ (u_longlong_t)val);
}
break;
@@ -2744,11 +2744,11 @@ userquota_propname_decode(const char *propname, boolean_t zoned,
*typep = type;
isuser = (type == ZFS_PROP_USERQUOTA || type == ZFS_PROP_USERUSED ||
- type == ZFS_PROP_USEROBJQUOTA ||
- type == ZFS_PROP_USEROBJUSED);
+ type == ZFS_PROP_USEROBJQUOTA ||
+ type == ZFS_PROP_USEROBJUSED);
isgroup = (type == ZFS_PROP_GROUPQUOTA || type == ZFS_PROP_GROUPUSED ||
- type == ZFS_PROP_GROUPOBJQUOTA ||
- type == ZFS_PROP_GROUPOBJUSED);
+ type == ZFS_PROP_GROUPOBJQUOTA ||
+ type == ZFS_PROP_GROUPOBJUSED);
cp = strchr(propname, '@') + 1;
diff --git a/lib/libzfs/libzfs_import.c b/lib/libzfs/libzfs_import.c
index fe783a3a3..d09367e88 100644
--- a/lib/libzfs/libzfs_import.c
+++ b/lib/libzfs/libzfs_import.c
@@ -200,7 +200,7 @@ boolean_t
udev_is_mpath(struct udev_device *dev)
{
return udev_device_get_property_value(dev, "DM_UUID") &&
- udev_device_get_property_value(dev, "MPATH_SBIN_PATH");
+ udev_device_get_property_value(dev, "MPATH_SBIN_PATH");
}
/*
diff --git a/lib/libzfs/libzfs_mount.c b/lib/libzfs/libzfs_mount.c
index ad8a3d20b..a2bb471b3 100644
--- a/lib/libzfs/libzfs_mount.c
+++ b/lib/libzfs/libzfs_mount.c
@@ -456,7 +456,7 @@ zfs_mount(zfs_handle_t *zhp, const char *options, int flags)
*/
if (!(flags & MS_OVERLAY)) {
if (zfs_prop_get(zhp, ZFS_PROP_OVERLAY, overlay,
- sizeof (overlay), NULL, NULL, 0, B_FALSE) == 0) {
+ sizeof (overlay), NULL, NULL, 0, B_FALSE) == 0) {
if (strcmp(overlay, "on") == 0) {
flags |= MS_OVERLAY;
}
diff --git a/lib/libzfs/libzfs_pool.c b/lib/libzfs/libzfs_pool.c
index 9d0702b56..2cfb01981 100644
--- a/lib/libzfs/libzfs_pool.c
+++ b/lib/libzfs/libzfs_pool.c
@@ -308,7 +308,7 @@ zpool_get_prop(zpool_handle_t *zhp, zpool_prop_t prop, char *buf,
case ZPOOL_PROP_ASHIFT:
if (literal)
(void) snprintf(buf, len, "%llu",
- (u_longlong_t)intval);
+ (u_longlong_t)intval);
else
(void) zfs_nicenum(intval, buf, len);
break;
@@ -3416,12 +3416,12 @@ zfs_strip_partition(char *path)
d = part + 1;
} else if ((tmp[0] == 'h' || tmp[0] == 's' || tmp[0] == 'v') &&
tmp[1] == 'd') {
- for (d = &tmp[2]; isalpha(*d); part = ++d);
+ for (d = &tmp[2]; isalpha(*d); part = ++d) { }
} else if (strncmp("xvd", tmp, 3) == 0) {
- for (d = &tmp[3]; isalpha(*d); part = ++d);
+ for (d = &tmp[3]; isalpha(*d); part = ++d) { }
}
if (part && d && *d != '\0') {
- for (; isdigit(*d); d++);
+ for (; isdigit(*d); d++) { }
if (*d == '\0')
*part = '\0';
}
@@ -4210,7 +4210,7 @@ zpool_label_name(char *label_name, int label_size)
if (id == 0)
id = (((uint64_t)rand()) << 32) | (uint64_t)rand();
- snprintf(label_name, label_size, "zfs-%016llx", (u_longlong_t) id);
+ snprintf(label_name, label_size, "zfs-%016llx", (u_longlong_t)id);
}
/*
diff --git a/lib/libzfs/libzfs_sendrecv.c b/lib/libzfs/libzfs_sendrecv.c
index 2334245c1..b140abe35 100644
--- a/lib/libzfs/libzfs_sendrecv.c
+++ b/lib/libzfs/libzfs_sendrecv.c
@@ -2615,7 +2615,7 @@ again:
else
progress = B_TRUE;
sprintf(guidname, "%llu",
- (u_longlong_t) parent_fromsnap_guid);
+ (u_longlong_t)parent_fromsnap_guid);
nvlist_add_boolean(deleted, guidname);
continue;
}
@@ -2649,7 +2649,7 @@ again:
parent_fromsnap_guid != 0 &&
stream_parent_fromsnap_guid != parent_fromsnap_guid) {
sprintf(guidname, "%llu",
- (u_longlong_t) parent_fromsnap_guid);
+ (u_longlong_t)parent_fromsnap_guid);
if (nvlist_exists(deleted, guidname)) {
progress = B_TRUE;
needagain = B_TRUE;
diff --git a/lib/libzfs/libzfs_util.c b/lib/libzfs/libzfs_util.c
index 95ec0b49d..a9c8374f1 100644
--- a/lib/libzfs/libzfs_util.c
+++ b/lib/libzfs/libzfs_util.c
@@ -617,7 +617,7 @@ zfs_nicenum_format(uint64_t num, char *buf, size_t buflen,
double val;
if (format == ZFS_NICENUM_RAW) {
- snprintf(buf, buflen, "%llu", (u_longlong_t) num);
+ snprintf(buf, buflen, "%llu", (u_longlong_t)num);
return;
}
@@ -633,12 +633,12 @@ zfs_nicenum_format(uint64_t num, char *buf, size_t buflen,
if ((format == ZFS_NICENUM_TIME) && (num == 0)) {
(void) snprintf(buf, buflen, "-");
} else if ((index == 0) || ((num %
- (uint64_t) powl(k_unit[format], index)) == 0)) {
+ (uint64_t)powl(k_unit[format], index)) == 0)) {
/*
* If this is an even multiple of the base, always display
* without any decimal precision.
*/
- (void) snprintf(buf, buflen, "%llu%s", (u_longlong_t) n, u);
+ (void) snprintf(buf, buflen, "%llu%s", (u_longlong_t)n, u);
} else {
/*
@@ -652,8 +652,8 @@ zfs_nicenum_format(uint64_t num, char *buf, size_t buflen,
*/
int i;
for (i = 2; i >= 0; i--) {
- val = (double) num /
- (uint64_t) powl(k_unit[format], index);
+ val = (double)num /
+ (uint64_t)powl(k_unit[format], index);
/*
* Don't print floating point values for time. Note,
@@ -752,7 +752,7 @@ libzfs_run_process(const char *path, char *argv[], int flags)
int status;
while ((error = waitpid(pid, &status, 0)) == -1 &&
- errno == EINTR);
+ errno == EINTR) { }
if (error < 0 || !WIFEXITED(status))
return (-1);