summaryrefslogtreecommitdiff
path: root/source4/rpc_server
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2011-03-04 10:44:22 +0100
committerMatthias Dieter Wallnöfer <mdw@samba.org>2011-03-04 22:07:24 +0100
commit349b9b72ec36194a1275eaa42ca145071256b623 (patch)
tree1727c1db47c347aae354f796bcbc3a13c00810c8 /source4/rpc_server
parent746194cfc4e0c119e1947f79ffc7cb50d50b9f43 (diff)
downloadsamba-349b9b72ec36194a1275eaa42ca145071256b623.tar.gz
samba-349b9b72ec36194a1275eaa42ca145071256b623.tar.bz2
samba-349b9b72ec36194a1275eaa42ca145071256b623.zip
s4:dsdb - we don't need to check if a DN != NULL if we call "ldb_dn_validate"
"ldb_dn_validate" is NULL-safe and does the check implicitly. Reviewed by: Tridge
Diffstat (limited to 'source4/rpc_server')
-rw-r--r--source4/rpc_server/drsuapi/getncchanges.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/source4/rpc_server/drsuapi/getncchanges.c b/source4/rpc_server/drsuapi/getncchanges.c
index b7431b6702..8ae536823d 100644
--- a/source4/rpc_server/drsuapi/getncchanges.c
+++ b/source4/rpc_server/drsuapi/getncchanges.c
@@ -621,8 +621,7 @@ static WERROR getncchanges_rid_alloc(struct drsuapi_bind_state *b_state,
}
req_dn = drs_ObjectIdentifier_to_dn(mem_ctx, ldb, req10->naming_context);
- if (!req_dn ||
- !ldb_dn_validate(req_dn) ||
+ if (!ldb_dn_validate(req_dn) ||
ldb_dn_compare(req_dn, rid_manager_dn) != 0) {
/* that isn't the RID Manager DN */
DEBUG(0,(__location__ ": RID Alloc request for wrong DN %s\n",
@@ -964,8 +963,7 @@ static WERROR getncchanges_change_master(struct drsuapi_bind_state *b_state,
*/
req_dn = drs_ObjectIdentifier_to_dn(mem_ctx, ldb, req10->naming_context);
- if (!req_dn ||
- !ldb_dn_validate(req_dn)) {
+ if (!ldb_dn_validate(req_dn)) {
/* that is not a valid dn */
DEBUG(0,(__location__ ": FSMO role transfer request for invalid DN %s\n",
drs_ObjectIdentifier_to_string(mem_ctx, req10->naming_context)));