summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-01-22 09:13:25 +0100
committerVolker Lendecke <vl@samba.org>2008-01-22 09:16:28 +0100
commit597b28b86ed99acfb488afb86b11fe48538cf169 (patch)
tree2d17ee67faa017c440048424cbc2468b2f433a52 /source3
parentfeb77c978bede01156ae1eb17c73842c7a27cda5 (diff)
downloadsamba-597b28b86ed99acfb488afb86b11fe48538cf169.tar.gz
samba-597b28b86ed99acfb488afb86b11fe48538cf169.tar.bz2
samba-597b28b86ed99acfb488afb86b11fe48538cf169.zip
Fix a segfault
Found by the IBM checker. Jeremy, you changed this from 'dirname == 0' which does not make sense at all in the old code to '!dirname == 0' which from my point of view makes even less sense, because the precedence of ! is according to Harbison/Steele higher than the precedence of ==. Please check that the code now actually does what it's supposed to do. Thanks! (This used to be commit c8def5564739c4c754001f84fcfb77f1093b96c3)
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/utmp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/smbd/utmp.c b/source3/smbd/utmp.c
index e82bbea3b3..5931b2b1d0 100644
--- a/source3/smbd/utmp.c
+++ b/source3/smbd/utmp.c
@@ -223,7 +223,7 @@ static char *uw_pathname(TALLOC_CTX *ctx,
}
/* For u-files and non-explicit w-dir, look for "utmp dir" */
- if (!dirname == 0 || strlen(dirname) == 0) {
+ if ((dirname == NULL) || (strlen(dirname) == 0)) {
dirname = talloc_strdup(ctx, lp_utmpdir());
if (!dirname) {
return NULL;