summaryrefslogtreecommitdiff
path: root/source3/smbd/mangle_hash.c
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2003-06-22 10:09:52 +0000
committerSimo Sorce <idra@samba.org>2003-06-22 10:09:52 +0000
commitf5974dfaae680d98b78d600cd1f1aaece332a085 (patch)
treebd24ad803125c21cdb82a27d051e0029cb21ad65 /source3/smbd/mangle_hash.c
parent4830a878455fe0e525aa3bd2a59e55d1f30bddad (diff)
downloadsamba-f5974dfaae680d98b78d600cd1f1aaece332a085.tar.gz
samba-f5974dfaae680d98b78d600cd1f1aaece332a085.tar.bz2
samba-f5974dfaae680d98b78d600cd1f1aaece332a085.zip
Found out a good number of NT_STATUS_IS_ERR used the wrong way.
As abartlet rememberd me NT_STATUS_IS_ERR != !NT_STATUS_IS_OK This patch will cure the problem. Working on this one I found 16 functions where I think NT_STATUS_IS_ERR() is used correctly, but I'm not 100% sure, coders should check the use of NT_STATUS_IS_ERR() in samba is ok now. Simo. (This used to be commit c501e84d412563eb3f674f76038ec48c2b458687)
Diffstat (limited to 'source3/smbd/mangle_hash.c')
-rw-r--r--source3/smbd/mangle_hash.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/smbd/mangle_hash.c b/source3/smbd/mangle_hash.c
index d2eb996899..d4cf369f28 100644
--- a/source3/smbd/mangle_hash.c
+++ b/source3/smbd/mangle_hash.c
@@ -217,7 +217,7 @@ static NTSTATUS is_valid_name(const smb_ucs2_t *fname, BOOL allow_wildcards)
return NT_STATUS_UNSUCCESSFUL;
ret = has_valid_chars(fname, allow_wildcards);
- if (NT_STATUS_IS_ERR(ret))
+ if (!NT_STATUS_IS_OK(ret))
return ret;
str = strdup_w(fname);
@@ -285,10 +285,10 @@ static NTSTATUS is_8_3_w(const smb_ucs2_t *fname, BOOL allow_wildcards)
if (strcmp_wa(fname, ".") == 0 || strcmp_wa(fname, "..") == 0)
return NT_STATUS_OK;
- if (NT_STATUS_IS_ERR(is_valid_name(fname, allow_wildcards)))
+ if (!NT_STATUS_IS_OK(is_valid_name(fname, allow_wildcards)))
goto done;
- if (NT_STATUS_IS_ERR(mangle_get_prefix(fname, &pref, &ext, allow_wildcards)))
+ if (!NT_STATUS_IS_OK(mangle_get_prefix(fname, &pref, &ext, allow_wildcards)))
goto done;
plen = strlen_w(pref);
@@ -735,7 +735,7 @@ static void name_map(char *OutName, BOOL need83, BOOL cache83)
return;
}
- if( !need83 && NT_STATUS_IS_ERR(is_valid_name(OutName_ucs2, False)))
+ if( !need83 && !NT_STATUS_IS_OK(is_valid_name(OutName_ucs2, False)))
need83 = True;
/* check if it's already in 8.3 format */