diff options
author | Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de> | 2008-09-09 17:36:52 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-09-24 19:40:03 +0200 |
commit | 9d849c30bc5dfb4c3b27639c52ba8c2a54d07471 (patch) | |
tree | 115e4b33bc4464a3b688804aa2284d3317bcb1be /source4/lib/ldb/common/ldb_ldif.c | |
parent | 9261fa997ccda8f89556b644ddd45cd86919ec2e (diff) | |
download | samba-9d849c30bc5dfb4c3b27639c52ba8c2a54d07471.tar.gz samba-9d849c30bc5dfb4c3b27639c52ba8c2a54d07471.tar.bz2 samba-9d849c30bc5dfb4c3b27639c52ba8c2a54d07471.zip |
Cosmetic corrections for the LDB library
This commit applies some cosmetic corrections for the LDB library.
Diffstat (limited to 'source4/lib/ldb/common/ldb_ldif.c')
-rw-r--r-- | source4/lib/ldb/common/ldb_ldif.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/source4/lib/ldb/common/ldb_ldif.c b/source4/lib/ldb/common/ldb_ldif.c index fb93e17c6c..6cbd30f377 100644 --- a/source4/lib/ldb/common/ldb_ldif.c +++ b/source4/lib/ldb/common/ldb_ldif.c @@ -191,19 +191,19 @@ int ldb_should_b64_encode(const struct ldb_val *val) uint8_t *p = val->data; if (val->length == 0) { - return 0; + return LDB_SUCCESS; } if (p[0] == ' ' || p[0] == ':') { - return 1; + return LDB_ERR_OPERATIONS_ERROR; } for (i=0; i<val->length; i++) { if (!isprint(p[i]) || p[i] == '\n') { - return 1; + return LDB_ERR_OPERATIONS_ERROR; } } - return 0; + return LDB_SUCCESS; } /* this macro is used to handle the return checking on fprintf_fn() */ @@ -444,12 +444,12 @@ static int next_attr(void *mem_ctx, char **s, const char **attr, struct ldb_val value->length = 0; *attr = "-"; *s += 2; - return 0; + return LDB_SUCCESS; } p = strchr(*s, ':'); if (!p) { - return -1; + return LDB_ERR_OPERATIONS_ERROR; } *p++ = 0; @@ -487,7 +487,7 @@ static int next_attr(void *mem_ctx, char **s, const char **attr, struct ldb_val int len = ldb_base64_decode((char *)value->data); if (len == -1) { /* it wasn't valid base64 data */ - return -1; + return LDB_ERR_OPERATIONS_ERROR; } value->length = len; } @@ -496,11 +496,11 @@ static int next_attr(void *mem_ctx, char **s, const char **attr, struct ldb_val int len = ldb_read_data_file(mem_ctx, value); if (len == -1) { /* an error occured hile trying to retrieve the file */ - return -1; + return LDB_ERR_OPERATIONS_ERROR; } } - return 0; + return LDB_SUCCESS; } |