summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2010-09-09 11:10:01 +0200
committerGünther Deschner <gd@samba.org>2010-09-09 11:11:04 +0200
commita4d23ed66ff32b5a9dc00ea82036436df0e97505 (patch)
treecb5ac8f6fa5cd0b782824af6470619484aec80c2 /lib
parentf1aa9ebb08d617f4eeeebed70af202764f40ee90 (diff)
downloadsamba-a4d23ed66ff32b5a9dc00ea82036436df0e97505.tar.gz
samba-a4d23ed66ff32b5a9dc00ea82036436df0e97505.tar.bz2
samba-a4d23ed66ff32b5a9dc00ea82036436df0e97505.zip
lib/util: remove some unused_result warnings.
Guenther
Diffstat (limited to 'lib')
-rw-r--r--lib/util/util.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/util/util.c b/lib/util/util.c
index c0af4b0116..076ddf47fc 100644
--- a/lib/util/util.c
+++ b/lib/util/util.c
@@ -899,8 +899,13 @@ void *allocate_anonymous_shared(size_t bufsz)
void samba_start_debugger(void)
{
char *cmd = NULL;
- asprintf(&cmd, "xterm -e \"gdb --pid %u\"&", getpid());
- system(cmd);
+ if (asprintf(&cmd, "xterm -e \"gdb --pid %u\"&", getpid()) == -1) {
+ return;
+ }
+ if (system(cmd) == -1) {
+ free(cmd);
+ return;
+ }
free(cmd);
sleep(2);
}