summaryrefslogtreecommitdiffstats
path: root/source3/utils/status.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2014-09-24 20:46:15 +0200
committerJeremy Allison <jra@samba.org>2014-10-31 03:47:40 +0100
commit9010bbeb00264f4476c3be7d2e8c8420c695cfbb (patch)
treec03448a0c323c99a1d5f55106a7bd5372929ea57 /source3/utils/status.c
parent48926b761975a7d9cb6daf30d64d6a4f0a34f38a (diff)
downloadsamba-9010bbeb00264f4476c3be7d2e8c8420c695cfbb.tar.gz
samba-9010bbeb00264f4476c3be7d2e8c8420c695cfbb.tar.xz
samba-9010bbeb00264f4476c3be7d2e8c8420c695cfbb.zip
s3:locking: allow early return for share_entry_forall()
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source3/utils/status.c')
-rw-r--r--source3/utils/status.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/source3/utils/status.c b/source3/utils/status.c
index 2c850bb591..b58981329b 100644
--- a/source3/utils/status.c
+++ b/source3/utils/status.c
@@ -115,10 +115,10 @@ static bool Ucrit_addPid( struct server_id pid )
return True;
}
-static void print_share_mode(const struct share_mode_entry *e,
- const char *sharepath,
- const char *fname,
- void *dummy)
+static int print_share_mode(const struct share_mode_entry *e,
+ const char *sharepath,
+ const char *fname,
+ void *dummy)
{
static int count;
@@ -135,7 +135,7 @@ static void print_share_mode(const struct share_mode_entry *e,
if (do_checks && !serverid_exists(&e->pid)) {
/* the process for this entry does not exist any more */
- return;
+ return 0;
}
if (Ucrit_checkPid(e->pid)) {
@@ -183,6 +183,8 @@ static void print_share_mode(const struct share_mode_entry *e,
d_printf(" %s %s %s",sharepath, fname, time_to_asc((time_t)e->time.tv_sec));
}
+
+ return 0;
}
static void print_brl(struct file_id id,