mirror of
https://github.com/samba-team/samba.git
synced 2025-01-13 13:18:06 +03:00
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 commit is contained in:
parent
196e4ce8c5
commit
c8def55647
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user