[SSSD] [PATCH] SYSDB: Remove useless NULL test.

Lukas Slebodnik lslebodn at redhat.com
Mon Jun 23 07:33:56 UTC 2014


ehlo,

There is a test for NULL after calling talloc_strndup
and variable version was used a few times in strcmp before debug message.

Simple patch is attached.

LS
-------------- next part --------------
>From b328b0d34d7d90e01b37cb3ecdcf43526055a6ca Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lslebodn at redhat.com>
Date: Mon, 23 Jun 2014 07:06:46 +0200
Subject: [PATCH 2/3] SYSDB: Remove useless NULL test.

There is a test for NULL after calling talloc_strndup
and variable version was used a few times in strcmp before debug message.
---
 src/db/sysdb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/db/sysdb.c b/src/db/sysdb.c
index edbd7ad2e34a3ef32f3144a8e4a48e36393c1dd9..626ec0de4f4a4e99978e6f9324938a15c3bbc6c3 100644
--- a/src/db/sysdb.c
+++ b/src/db/sysdb.c
@@ -1235,7 +1235,7 @@ int sysdb_domain_init_internal(TALLOC_CTX *mem_ctx,
 
         DEBUG(SSSDBG_FATAL_FAILURE,
               "Unknown DB version [%s], expected [%s] for domain %s!\n",
-                 version?version:"not found", SYSDB_VERSION, domain->name);
+              version, SYSDB_VERSION, domain->name);
         ret = sysdb_version_check(SYSDB_VERSION, version);
         goto done;
     }
-- 
1.9.3



More information about the sssd-devel mailing list