summaryrefslogtreecommitdiffstats
path: root/source/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
commitc501e84d412563eb3f674f76038ec48c2b458687 (patch)
tree50bab35223837e8be991daaba0adfd7b5539a3fe /source/smbd/mangle_hash.c
parentb7760faedc2181538ffc325e727808e6df8f943f (diff)
downloadsamba-c501e84d412563eb3f674f76038ec48c2b458687.tar.gz
samba-c501e84d412563eb3f674f76038ec48c2b458687.tar.xz
samba-c501e84d412563eb3f674f76038ec48c2b458687.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.
Diffstat (limited to 'source/smbd/mangle_hash.c')
-rw-r--r--source/smbd/mangle_hash.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/smbd/mangle_hash.c b/source/smbd/mangle_hash.c
index d2eb996899c..d4cf369f287 100644
--- a/source/smbd/mangle_hash.c
+++ b/source/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 */