summaryrefslogtreecommitdiff
path: root/lib/ldb-samba/ldb_matching_rules.c
diff options
context:
space:
mode:
authorSwen Schillig <swen@linux.ibm.com>2019-03-06 10:02:53 +0100
committerChristof Schmitt <cs@samba.org>2019-04-11 22:29:27 +0000
commit6461a9920393b6e56f807b68d738089adbd55cd5 (patch)
treeacbe5fad6ec0f9f975b10bd92d8885664ae7bce8 /lib/ldb-samba/ldb_matching_rules.c
parent6c1068ac00aca2c914e69dbd81532223180a5615 (diff)
downloadsamba-6461a9920393b6e56f807b68d738089adbd55cd5.tar.gz
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 <swen@linux.ibm.com> Reviewed-by: Ralph Boehme <slow@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
Diffstat (limited to 'lib/ldb-samba/ldb_matching_rules.c')
-rw-r--r--lib/ldb-samba/ldb_matching_rules.c14
1 files changed, 2 insertions, 12 deletions
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;
}
}