summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-12-24 13:36:00 +0100
committerVolker Lendecke <vl@samba.org>2009-12-24 15:24:34 +0100
commitdaecb747e47884af9107a06cc4f03cabb1ab83aa (patch)
tree5b886e49255fa0fabf8b4820eca3c20c0d859bac /source3
parent56f9d18fba6a6b426cb3ea539571cea2111cca46 (diff)
downloadsamba-daecb747e47884af9107a06cc4f03cabb1ab83aa.tar.gz
samba-daecb747e47884af9107a06cc4f03cabb1ab83aa.tar.bz2
samba-daecb747e47884af9107a06cc4f03cabb1ab83aa.zip
s3: Remove some pointless SMB_ASSERTs
Diffstat (limited to 'source3')
-rw-r--r--source3/libsmb/conncache.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/source3/libsmb/conncache.c b/source3/libsmb/conncache.c
index 521598f655..3207fbbc9e 100644
--- a/source3/libsmb/conncache.c
+++ b/source3/libsmb/conncache.c
@@ -56,7 +56,9 @@ static char *negative_conn_cache_keystr(const char *domain, const char *server)
const char NEGATIVE_CONN_CACHE_KEY_FMT[] = "%s/%s,%s";
char *keystr = NULL;
- SMB_ASSERT(domain != NULL);
+ if (domain == NULL) {
+ return NULL;
+ }
if (server == NULL)
server = "";
@@ -102,7 +104,9 @@ static NTSTATUS negative_conn_cache_valuedecode(const char *value)
{
NTSTATUS result = NT_STATUS_OK;
- SMB_ASSERT(value != NULL);
+ if (value == NULL) {
+ return NT_STATUS_INTERNAL_ERROR;
+ }
if (sscanf(value, "%x", &(NT_STATUS_V(result))) != 1)
DEBUG(0, ("negative_conn_cache_valuestr: unable to parse "
"value field '%s'\n", value));
@@ -189,7 +193,10 @@ void add_failed_connection_entry(const char *domain, const char *server,
char *key = NULL;
char *value = NULL;
- SMB_ASSERT(!NT_STATUS_IS_OK(result));
+ if (NT_STATUS_IS_OK(result)) {
+ /* Nothing failed here */
+ return;
+ }
key = negative_conn_cache_keystr(domain, server);
if (key == NULL) {