Code Review
/
src
/
app-framework-binder.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
wrap-json: Sync with app-afb-helpers-submodule
[src/app-framework-binder.git]
/
src
/
wrap-json.c
diff --git
a/src/wrap-json.c
b/src/wrap-json.c
index
3b8a6df
..
46a4d67
100644
(file)
--- a/
src/wrap-json.c
+++ b/
src/wrap-json.c
@@
-103,8
+103,8
@@
static int encode_base64(
int pad,
int url)
{
int pad,
int url)
{
- uint16_t u16;
- uint8_t u8;
+ uint16_t u16
= 0
;
+ uint8_t u8
= 0
;
size_t in, out, rlen, n3, r3, iout, nout;
int iw;
char *result, c;
size_t in, out, rlen, n3, r3, iout, nout;
int iw;
char *result, c;
@@
-517,7
+517,7
@@
static int vunpack(struct json_object *object, const char *desc, va_list args, i
int64_t *pI = NULL;
size_t *pz = NULL;
uint8_t **py = NULL;
int64_t *pI = NULL;
size_t *pz = NULL;
uint8_t **py = NULL;
- struct { struct json_object *parent; const char *acc; int index
,
count; char type; } stack[STACKCOUNT], *top;
+ struct { struct json_object *parent; const char *acc; int index
; size_t
count; char type; } stack[STACKCOUNT], *top;
struct json_object *obj;
struct json_object **po;
struct json_object *obj;
struct json_object **po;
@@
-845,7
+845,7
@@
static void object_for_all(struct json_object *object, void (*callback)(void*,st
static void array_for_all(struct json_object *object, void (*callback)(void*,struct json_object*), void *closure)
{
static void array_for_all(struct json_object *object, void (*callback)(void*,struct json_object*), void *closure)
{
-
in
t n = json_object_array_length(object);
+
size_
t n = json_object_array_length(object);
int i = 0;
while(i < n)
callback(closure, json_object_array_get_idx(object, i++));
int i = 0;
while(i < n)
callback(closure, json_object_array_get_idx(object, i++));
@@
-888,7
+888,7
@@
void wrap_json_for_all(struct json_object *object, void (*callback)(void*,struct
else if (!json_object_is_type(object, json_type_array))
callback(closure, object, NULL);
else {
else if (!json_object_is_type(object, json_type_array))
callback(closure, object, NULL);
else {
-
in
t n = json_object_array_length(object);
+
size_
t n = json_object_array_length(object);
int i = 0;
while(i < n)
callback(closure, json_object_array_get_idx(object, i++), NULL);
int i = 0;
while(i < n)
callback(closure, json_object_array_get_idx(object, i++), NULL);
@@
-1139,4
+1139,3
@@
int main()
json_decref(j);
#endif
json_decref(j);
#endif
-