s4-dsdb: fix the build of audit_util.c
authorGünther Deschner <gd@samba.org>
Tue, 12 Jun 2018 10:54:15 +0000 (12:54 +0200)
committerVolker Lendecke <vl@samba.org>
Sat, 16 Jun 2018 09:56:53 +0000 (11:56 +0200)
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Sat Jun 16 11:56:53 CEST 2018 on sn-devel-144

source4/dsdb/samdb/ldb_modules/audit_util.c

index e36ddcb90eb15af444a56753f7083767525ce60d..be2c522ace752cef772c2e7c6f3f39e6aaaf42d4 100644 (file)
@@ -470,6 +470,9 @@ static void dsdb_audit_add_ldb_value(
        struct json_object *array,
        const struct ldb_val lv)
 {
+       bool base64;
+       int len;
+       struct json_object value;
 
        json_assert_is_array(array);
        if (json_is_invalid(array)) {
@@ -481,9 +484,10 @@ static void dsdb_audit_add_ldb_value(
                return;
        }
 
-       bool base64 = ldb_should_b64_encode(NULL, &lv);
-       int len = min(lv.length, MAX_LENGTH);
-       struct json_object value = json_new_object();
+       base64 = ldb_should_b64_encode(NULL, &lv);
+       len = min(lv.length, MAX_LENGTH);
+       value = json_new_object();
+
        if (lv.length > MAX_LENGTH) {
                json_add_bool(&value, "truncated", true);
        }