summaryrefslogtreecommitdiff
path: root/source3/libsmb/conncache.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/libsmb/conncache.c')
-rw-r--r--source3/libsmb/conncache.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source3/libsmb/conncache.c b/source3/libsmb/conncache.c
index 3207fbbc9e..601c477960 100644
--- a/source3/libsmb/conncache.c
+++ b/source3/libsmb/conncache.c
@@ -102,15 +102,16 @@ static char *negative_conn_cache_valuestr(NTSTATUS status)
*/
static NTSTATUS negative_conn_cache_valuedecode(const char *value)
{
- NTSTATUS result = NT_STATUS_OK;
+ unsigned int v = NT_STATUS_V(NT_STATUS_INTERNAL_ERROR);;
- if (value == NULL) {
+ if (value != NULL) {
return NT_STATUS_INTERNAL_ERROR;
}
- if (sscanf(value, "%x", &(NT_STATUS_V(result))) != 1)
+ if (sscanf(value, "%x", &v) != 1) {
DEBUG(0, ("negative_conn_cache_valuestr: unable to parse "
"value field '%s'\n", value));
- return result;
+ }
+ return NT_STATUS(v);
}
/**