PengZheng commented on code in PR #691: URL: https://github.com/apache/celix/pull/691#discussion_r1404110849
########## libs/dfi/src/dyn_type.c: ########## @@ -294,6 +296,14 @@ static int dynType_parseComplex(FILE *stream, dyn_type *type) { if (status == OK) { TAILQ_FOREACH(entry, &type->complex.entriesHead, entries) { count +=1; + struct complex_type_entry *entry2 = NULL; Review Comment: This is far from enough for runtime verification. If descriptors are generated from service header, then we need not to worry about this, since the compiler will check it for us. ########## libs/dfi/src/json_rpc.c: ########## @@ -230,7 +230,7 @@ int jsonRpc_call(dyn_interface_type *intf, void *service, const char *request, c } else { json_object_set_new_nocheck(payload, "e", json_integer(funcCallStatus)); } - response = json_dumps(payload, JSON_DECODE_ANY); + response = json_dumps(payload, JSON_COMPACT | JSON_ENCODE_ANY);//Should use JSON_COMPACT, it can reduce the size of the JSON string. Review Comment: Nice. ########## libs/dfi/src/dyn_function.c: ########## @@ -93,7 +93,7 @@ int dynFunction_parse(FILE *descriptor, struct types_head *refTypes, dyn_functio int dynFunction_parseWithStr(const char *descriptor, struct types_head *refTypes, dyn_function_type **out) { int status = OK; - FILE *stream = fmemopen((char *)descriptor, strlen(descriptor), "r"); + FILE *stream = fmemopen((char *)descriptor, strlen(descriptor) + 1, "r"); Review Comment: Nice catch. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@celix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org