From d1d7e2689db9e03f11c069ebc9f1ba12829e5dac Mon Sep 17 00:00:00 2001 From: Michael Kjorling Date: Fri, 1 Nov 2013 20:26:11 +0100 Subject: cstyle: Resolve C style issues The vast majority of these changes are in Linux specific code. They are the result of not having an automated style checker to validate the code when it was originally written. Others were caused when the common code was slightly adjusted for Linux. This patch contains no functional changes. It only refreshes the code to conform to style guide. Everyone submitting patches for inclusion upstream should now run 'make checkstyle' and resolve any warning prior to opening a pull request. The automated builders have been updated to fail a build if when 'make checkstyle' detects an issue. Signed-off-by: Brian Behlendorf Closes #1821 --- cmd/zfs/zfs_iter.c | 4 ++-- cmd/zfs/zfs_main.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'cmd/zfs') diff --git a/cmd/zfs/zfs_iter.c b/cmd/zfs/zfs_iter.c index bbc47da9e..8892d91f2 100644 --- a/cmd/zfs/zfs_iter.c +++ b/cmd/zfs/zfs_iter.c @@ -313,8 +313,8 @@ zfs_sort(const void *larg, const void *rarg, void *data) } else if (psc->sc_prop == ZFS_PROP_NAME) { lvalid = rvalid = B_TRUE; - (void) strlcpy(lbuf, zfs_get_name(l), sizeof(lbuf)); - (void) strlcpy(rbuf, zfs_get_name(r), sizeof(rbuf)); + (void) strlcpy(lbuf, zfs_get_name(l), sizeof (lbuf)); + (void) strlcpy(rbuf, zfs_get_name(r), sizeof (rbuf)); lstr = lbuf; rstr = rbuf; diff --git a/cmd/zfs/zfs_main.c b/cmd/zfs/zfs_main.c index 98c53dd59..3f54985b9 100644 --- a/cmd/zfs/zfs_main.c +++ b/cmd/zfs/zfs_main.c @@ -2879,13 +2879,13 @@ print_dataset(zfs_handle_t *zhp, list_cbdata_t *cb) if (pl->pl_prop == ZFS_PROP_NAME) { (void) strlcpy(property, zfs_get_name(zhp), - sizeof(property)); + sizeof (property)); propstr = property; right_justify = zfs_prop_align_right(pl->pl_prop); } else if (pl->pl_prop != ZPROP_INVAL) { if (zfs_prop_get(zhp, pl->pl_prop, property, sizeof (property), NULL, NULL, 0, - cb->cb_literal) != 0) + cb->cb_literal) != 0) propstr = "-"; else propstr = property; -- cgit v1.2.3