diff options
author | Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de> | 2009-11-06 18:35:17 +0100 |
---|---|---|
committer | Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de> | 2010-03-08 12:52:24 +0100 |
commit | 4e16a285c7c34732ba95fb5ec201e6f11cf88bef (patch) | |
tree | 9fcc4fc18c0c6a36728a511eacd34535bbec8178 /source4/lib/ldb/common/ldb_controls.c | |
parent | 30ff229a3e32549073424b423302e976c988d563 (diff) | |
download | samba-4e16a285c7c34732ba95fb5ec201e6f11cf88bef.tar.gz samba-4e16a285c7c34732ba95fb5ec201e6f11cf88bef.tar.bz2 samba-4e16a285c7c34732ba95fb5ec201e6f11cf88bef.zip |
LDB:common - Change counters to "unsigned" where appropriate
To count LDB objects use variables of type "unsigned (int)" or "long long int"
on binary or downto searches.
To count characters in strings use "size_t".
To calculate differences between pointers use "ptrdiff_t".
Diffstat (limited to 'source4/lib/ldb/common/ldb_controls.c')
-rw-r--r-- | source4/lib/ldb/common/ldb_controls.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source4/lib/ldb/common/ldb_controls.c b/source4/lib/ldb/common/ldb_controls.c index 8da43ab9b1..ef0e06f6ce 100644 --- a/source4/lib/ldb/common/ldb_controls.c +++ b/source4/lib/ldb/common/ldb_controls.c @@ -37,7 +37,7 @@ /* returns NULL if not found */ struct ldb_control *ldb_request_get_control(struct ldb_request *req, const char *oid) { - int i; + unsigned int i; if (req->controls != NULL) { for (i = 0; req->controls[i]; i++) { @@ -56,7 +56,7 @@ struct ldb_control *ldb_request_get_control(struct ldb_request *req, const char /* returns NULL if not found */ struct ldb_control *ldb_reply_get_control(struct ldb_reply *rep, const char *oid) { - int i; + unsigned int i; if (rep->controls != NULL) { for (i = 0; rep->controls[i]; i++) { @@ -77,7 +77,7 @@ the "exclude" control */ int save_controls(struct ldb_control *exclude, struct ldb_request *req, struct ldb_control ***saver) { struct ldb_control **lcs; - int i, j; + unsigned int i, j; *saver = req->controls; for (i = 0; req->controls[i]; i++); @@ -110,7 +110,7 @@ struct ldb_control **controls_except_specified(struct ldb_control **controls_in, struct ldb_control *exclude) { struct ldb_control **lcs = NULL; - int i, j; + unsigned int i, j; for (i = 0; controls_in && controls_in[i]; i++); @@ -147,7 +147,7 @@ struct ldb_control **controls_except_specified(struct ldb_control **controls_in, /* return True if any, False if none */ int check_critical_controls(struct ldb_control **controls) { - int i; + unsigned int i; if (controls == NULL) { return 0; @@ -164,7 +164,7 @@ int check_critical_controls(struct ldb_control **controls) int ldb_request_add_control(struct ldb_request *req, const char *oid, bool critical, void *data) { - unsigned i, n; + unsigned int i, n; struct ldb_control **ctrls; struct ldb_control *ctrl; @@ -238,7 +238,7 @@ int ldb_reply_add_control(struct ldb_reply *ares, const char *oid, bool critical struct ldb_control **ldb_parse_control_strings(struct ldb_context *ldb, void *mem_ctx, const char **control_strings) { - int i; + unsigned int i; struct ldb_control **ctrl; char *error_string = NULL; |