s3: Fix a 64-bit error
authorVolker Lendecke <vl@samba.org>
Thu, 24 Dec 2009 12:40:24 +0000 (13:40 +0100)
committerVolker Lendecke <vl@samba.org>
Thu, 24 Dec 2009 14:24:35 +0000 (15:24 +0100)
source3/libsmb/conncache.c

index 3207fbbc9edb468016a593d6c4b7323c52826b2a..601c4779601ff4de53d347a2ee8cfa4d2fbc842c 100644 (file)
@@ -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);
 }
 
 /**