From 6461a9920393b6e56f807b68d738089adbd55cd5 Mon Sep 17 00:00:00 2001 From: Swen Schillig Date: Wed, 6 Mar 2019 10:02:53 +0100 Subject: common-lib: Update error check for new string conversion wrapper The new string conversion wrappers detect and flag errors which occured during the string to integer conversion. Those modifications required an update of the callees error checks. Signed-off-by: Swen Schillig Reviewed-by: Ralph Boehme Reviewed-by: Christof Schmitt --- lib/ldb-samba/ldb_matching_rules.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'lib/ldb-samba/ldb_matching_rules.c') diff --git a/lib/ldb-samba/ldb_matching_rules.c b/lib/ldb-samba/ldb_matching_rules.c index 7387c12f10d..0754e7e066b 100644 --- a/lib/ldb-samba/ldb_matching_rules.c +++ b/lib/ldb-samba/ldb_matching_rules.c @@ -393,12 +393,7 @@ static int dsdb_match_for_dns_to_tombstone_time(struct ldb_context *ldb, return LDB_ERR_INVALID_ATTRIBUTE_SYNTAX; } tombstone_time = strtoull_err(s, &p, 10, &error); - if (p == NULL || - p == s || - *p != '\0' || - error != 0 || - tombstone_time == ULLONG_MAX) - { + if (error != 0 || *p != '\0') { DBG_ERR("Invalid timestamp string passed\n"); return LDB_ERR_INVALID_ATTRIBUTE_SYNTAX; } @@ -529,12 +524,7 @@ static int dsdb_match_for_expunge(struct ldb_context *ldb, return LDB_ERR_INVALID_ATTRIBUTE_SYNTAX; } tombstone_time = strtoull_err(s, &p, 10, &error); - if (p == NULL || - p == s || - *p != '\0' || - error != 0 || - tombstone_time == ULLONG_MAX) - { + if (error != 0 || *p != '\0') { return LDB_ERR_INVALID_ATTRIBUTE_SYNTAX; } } -- cgit v1.2.1