summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1998-11-05 12:40:37 +0000
committerAndrew Tridgell <tridge@samba.org>1998-11-05 12:40:37 +0000
commitfa164d91bdaf0d5aaf2a7093cf450d3c7930e9e3 (patch)
treea8516523a4d3ce311362d16e48e3c5f84dfbef54
parent42a6727782aedc427f01f9a5e1caf563159c70da (diff)
downloadsamba-fa164d91bdaf0d5aaf2a7093cf450d3c7930e9e3.tar.gz
samba-fa164d91bdaf0d5aaf2a7093cf450d3c7930e9e3.tar.bz2
samba-fa164d91bdaf0d5aaf2a7093cf450d3c7930e9e3.zip
check return value of locking_init()
(This used to be commit 0efac70f756dce4c92744fc59b68b528f6984dee)
-rw-r--r--source3/utils/status.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/source3/utils/status.c b/source3/utils/status.c
index 344d46a9b9..fa1e8b43bf 100644
--- a/source3/utils/status.c
+++ b/source3/utils/status.c
@@ -309,17 +309,19 @@ static void print_share_mode(share_mode_entry *e, char *fname)
printf("\n");
if (!shares_only) {
+ if (!locking_init(1)) {
+ printf("Can't initialise shared memory - exiting\n");
+ exit(1);
+ }
- locking_init(1);
-
- if (share_mode_forall(print_share_mode) <= 0)
- printf("No locked files\n");
-
- printf("\n");
-
- share_status(stdout);
-
- locking_end();
+ if (share_mode_forall(print_share_mode) <= 0)
+ printf("No locked files\n");
+
+ printf("\n");
+
+ share_status(stdout);
+
+ locking_end();
}
return (0);