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
afb-trace: improve naming (minor)
[src/app-framework-binder.git]
/
src
/
genskel
/
genskel.c
diff --git
a/src/genskel/genskel.c
b/src/genskel/genskel.c
index
faebdb1
..
62dfe3f
100644
(file)
--- a/
src/genskel/genskel.c
+++ b/
src/genskel/genskel.c
@@
-34,7
+34,7
@@
* "b": "int"
* }
* }
* "b": "int"
* }
* }
- *
+ *
* Invocation: program [file|-]...
*
* without arguments, it reads the input.
* Invocation: program [file|-]...
*
* without arguments, it reads the input.
@@
-95,7
+95,7
@@
struct json_object *search(const char *path)
d = strtok(d, "/");
while(i && d) {
if (!json_object_object_get_ex(i, d, &i))
d = strtok(d, "/");
while(i && d) {
if (!json_object_object_get_ex(i, d, &i))
- return NULL;
+ return NULL;
d = strtok(NULL, "/");
}
return i;
d = strtok(NULL, "/");
}
return i;
@@
-109,7
+109,7
@@
struct json_object *expand_$ref(struct path path)
struct path *p;
struct json_object *o, *x;
int n, i;
struct path *p;
struct json_object *o, *x;
int n, i;
- struct json_object_iterator ji, jn;
+ struct json_object_iterator ji, jn;
/* expansion depends of the type of the node */
switch (json_object_get_type(path.object)) {
/* expansion depends of the type of the node */
switch (json_object_get_type(path.object)) {
@@
-305,7
+305,7
@@
struct json_object *new_perm(struct json_object *obj, const char *desc)
if (!d_perms) {
d_perms = json_object_new_object();
a_perms = json_object_new_array();
if (!d_perms) {
d_perms = json_object_new_object();
a_perms = json_object_new_array();
- }
+ }
asprintf(&b, "&_afb_auths_v2_%s[%d]", capi, json_object_array_length(a_perms));
x = json_object_new_string(desc);
asprintf(&b, "&_afb_auths_v2_%s[%d]", capi, json_object_array_length(a_perms));
x = json_object_new_string(desc);
@@
-651,7
+651,13
@@
void process(char *filename)
);
enum_verbs(print_struct_verb);
printf(
);
enum_verbs(print_struct_verb);
printf(
- " { .verb = NULL }\n"
+ " {\n"
+ " .verb = NULL,\n"
+ " .callback = NULL,\n"
+ " .auth = NULL,\n"
+ " .info = NULL,\n"
+ " .session = 0\n"
+ " }\n"
"};\n"
);
printf(
"};\n"
);
printf(
@@
-692,7
+698,7
@@
int main(int ac, char **av)
process("-");
else {
do { process(*av); } while(*++av);
process("-");
else {
do { process(*av); } while(*++av);
- }
+ }
return 0;
}
return 0;
}