aboutsummaryrefslogtreecommitdiffstats
path: root/lib/libshare
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2016-12-12 10:46:26 -0800
committerGitHub <[email protected]>2016-12-12 10:46:26 -0800
commit02730c333c4fce8c0ead1f7f3404caca5cdb3936 (patch)
treee3943bf33ee177c50004a08d1d4ea4188dbfc542 /lib/libshare
parentd57f03e40ec3bbf109e75b83699b58157b9a867d (diff)
Use cstyle -cpP in `make cstyle` check
Enable picky cstyle checks and resolve the new warnings. The vast majority of the changes needed were to handle minor issues with whitespace formatting. This patch contains no functional changes. Non-whitespace changes are as follows: * 8 times ; to { } in for/while loop * fix missing ; in cmd/zed/agents/zfs_diagnosis.c * comment (confim -> confirm) * change endline , to ; in cmd/zpool/zpool_main.c * a number of /* BEGIN CSTYLED */ /* END CSTYLED */ blocks * /* CSTYLED */ markers * change == 0 to ! * ulong to unsigned long in module/zfs/dsl_scan.c * rearrangement of module_param lines in module/zfs/metaslab.c * add { } block around statement after for_each_online_node Reviewed-by: Giuseppe Di Natale <[email protected]> Reviewed-by: HÃ¥kan Johansson <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #5465
Diffstat (limited to 'lib/libshare')
-rw-r--r--lib/libshare/libshare.c6
-rw-r--r--lib/libshare/nfs.c3
-rw-r--r--lib/libshare/smb.c4
3 files changed, 7 insertions, 6 deletions
diff --git a/lib/libshare/libshare.c b/lib/libshare/libshare.c
index 0eb4ae00d..41fe8bb6c 100644
--- a/lib/libshare/libshare.c
+++ b/lib/libshare/libshare.c
@@ -498,7 +498,7 @@ sa_enable_share(sa_share_t share, char *protocol)
#ifdef DEBUG
fprintf(stderr, "sa_enable_share: share->sharepath=%s, protocol=%s\n",
- impl_share->sharepath, protocol);
+ impl_share->sharepath, protocol);
#endif
assert(impl_share->handle != NULL);
@@ -539,7 +539,7 @@ sa_disable_share(sa_share_t share, char *protocol)
#ifdef DEBUG
fprintf(stderr, "sa_disable_share: share->sharepath=%s, protocol=%s\n",
- impl_share->sharepath, protocol);
+ impl_share->sharepath, protocol);
#endif
ret = SA_OK;
@@ -697,7 +697,7 @@ sa_parse_legacy_options(sa_group_t group, char *options, char *proto)
#ifdef DEBUG
fprintf(stderr, "sa_parse_legacy_options: options=%s, proto=%s\n",
- options, proto);
+ options, proto);
#endif
fstype = fstypes;
diff --git a/lib/libshare/nfs.c b/lib/libshare/nfs.c
index 9d548dccc..a542eff1b 100644
--- a/lib/libshare/nfs.c
+++ b/lib/libshare/nfs.c
@@ -688,7 +688,8 @@ nfs_check_exportfs(void)
}
if (pid > 0) {
- while ((rc = waitpid(pid, &status, 0)) <= 0 && errno == EINTR);
+ while ((rc = waitpid(pid, &status, 0)) <= 0 &&
+ errno == EINTR) { }
if (rc <= 0) {
(void) close(nfs_exportfs_temp_fd);
diff --git a/lib/libshare/smb.c b/lib/libshare/smb.c
index 343586508..76145bd93 100644
--- a/lib/libshare/smb.c
+++ b/lib/libshare/smb.c
@@ -154,7 +154,7 @@ smb_retrieve_shares(void)
continue; /* Incomplete share definition */
else {
shares = (smb_share_t *)
- malloc(sizeof (smb_share_t));
+ malloc(sizeof (smb_share_t));
if (shares == NULL) {
rc = SA_NO_MEMORY;
goto out;
@@ -395,7 +395,7 @@ smb_update_shareopts(sa_share_impl_t impl_share, const char *resource,
old_shareopts = FSINFO(impl_share, smb_fstype)->shareopts;
if (FSINFO(impl_share, smb_fstype)->active && old_shareopts != NULL &&
- strcmp(old_shareopts, shareopts) != 0) {
+ strcmp(old_shareopts, shareopts) != 0) {
needs_reshare = B_TRUE;
smb_disable_share(impl_share);
}