summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/afb/afb-session-v1.h4
-rw-r--r--src/TODO4
-rw-r--r--src/afb-api-ws.c1
-rw-r--r--src/afb-apiset.c2
-rw-r--r--src/afb-client-demo.c2
-rw-r--r--src/afb-config.h2
-rw-r--r--src/afb-ditf.c2
-rw-r--r--src/afb-monitor.c2
-rw-r--r--src/afb-proto-ws.c2
-rw-r--r--src/afb-proto-ws.h2
-rw-r--r--src/afb-stub-ws.c4
-rw-r--r--src/afb-trace.c6
-rw-r--r--src/genskel/exprefs.c8
-rw-r--r--src/genskel/genskel.c10
-rw-r--r--src/genskel/json2c.c4
-rw-r--r--src/jobs.c2
-rw-r--r--src/locale-root.c2
-rw-r--r--src/main.c1
-rwxr-xr-xsrc/tests/test-thread.sh2
-rw-r--r--src/wrap-json.c4
20 files changed, 29 insertions, 37 deletions
diff --git a/include/afb/afb-session-v1.h b/include/afb/afb-session-v1.h
index c287765d..26d03f12 100644
--- a/include/afb/afb-session-v1.h
+++ b/include/afb/afb-session-v1.h
@@ -45,12 +45,12 @@ enum afb_session_flags_v1
AFB_SESSION_LOA_LE_1_V1 = AFB_SESSION_LOA_LE_V1 | AFB_SESSION_LOA_1_V1, /* check LOA <= 1 */
AFB_SESSION_LOA_LE_2_V1 = AFB_SESSION_LOA_LE_V1 | AFB_SESSION_LOA_2_V1, /* check LOA <= 2 */
AFB_SESSION_LOA_LE_3_V1 = AFB_SESSION_LOA_LE_V1 | AFB_SESSION_LOA_3_V1, /* check LOA <= 3 */
-
+
AFB_SESSION_LOA_EQ_0_V1 = AFB_SESSION_LOA_EQ_V1 | AFB_SESSION_LOA_0_V1, /* check LOA == 0 */
AFB_SESSION_LOA_EQ_1_V1 = AFB_SESSION_LOA_EQ_V1 | AFB_SESSION_LOA_1_V1, /* check LOA == 1 */
AFB_SESSION_LOA_EQ_2_V1 = AFB_SESSION_LOA_EQ_V1 | AFB_SESSION_LOA_2_V1, /* check LOA == 2 */
AFB_SESSION_LOA_EQ_3_V1 = AFB_SESSION_LOA_EQ_V1 | AFB_SESSION_LOA_3_V1, /* check LOA == 3 */
-
+
AFB_SESSION_LOA_GE_0_V1 = AFB_SESSION_LOA_GE_V1 | AFB_SESSION_LOA_0_V1, /* check LOA >= 0 */
AFB_SESSION_LOA_GE_1_V1 = AFB_SESSION_LOA_GE_V1 | AFB_SESSION_LOA_1_V1, /* check LOA >= 1 */
AFB_SESSION_LOA_GE_2_V1 = AFB_SESSION_LOA_GE_V1 | AFB_SESSION_LOA_2_V1, /* check LOA >= 2 */
diff --git a/src/TODO b/src/TODO
deleted file mode 100644
index 0b6b180a..00000000
--- a/src/TODO
+++ /dev/null
@@ -1,4 +0,0 @@
-may 13th 2016
--------------
- -
- -
diff --git a/src/afb-api-ws.c b/src/afb-api-ws.c
index 0022d526..7e0adb7e 100644
--- a/src/afb-api-ws.c
+++ b/src/afb-api-ws.c
@@ -169,7 +169,6 @@ static int api_ws_socket_inet(const char *path, int server)
}
freeaddrinfo(rai);
return -1;
-
}
static int api_ws_socket(const char *path, int server)
diff --git a/src/afb-apiset.c b/src/afb-apiset.c
index 38edcd58..cad12e97 100644
--- a/src/afb-apiset.c
+++ b/src/afb-apiset.c
@@ -418,7 +418,7 @@ int afb_apiset_start_all_services(struct afb_apiset *set, int share_session)
return rc;
i++;
}
-
+
return set->subset ? afb_apiset_start_all_services(set->subset, share_session) : 0;
}
diff --git a/src/afb-client-demo.c b/src/afb-client-demo.c
index b1191044..305e1b34 100644
--- a/src/afb-client-demo.c
+++ b/src/afb-client-demo.c
@@ -85,7 +85,7 @@ int main(int ac, char **av, char **env)
else if (!strcmp(av[1], "--raw")) /* request for raw output */
raw = 1;
-
+
/* emit usage and exit */
else
usage(!!strcmp(av[1], "--help"), a0);
diff --git a/src/afb-config.h b/src/afb-config.h
index f1a27f7a..b47670d3 100644
--- a/src/afb-config.h
+++ b/src/afb-config.h
@@ -17,7 +17,7 @@
#pragma once
/*
- * other definitions ---------------------------------------------------
+ * other definitions ---------------------------------------------------
*/
struct afb_config_list {
diff --git a/src/afb-ditf.c b/src/afb-ditf.c
index d3db9bb0..a7f97ddc 100644
--- a/src/afb-ditf.c
+++ b/src/afb-ditf.c
@@ -67,7 +67,6 @@ static struct afb_event event_make_cb(void *closure, const char *name)
/* check daemon state */
if (ditf->state == Daemon_Pre_Init) {
-
ERROR("[API %s] Bad call to 'afb_daemon_event_make(%s)', must not be in PreInit", ditf->api, name);
errno = EINVAL;
return (struct afb_event){ .itf = NULL, .closure = NULL };
@@ -93,7 +92,6 @@ static int event_broadcast_cb(void *closure, const char *name, struct json_objec
/* check daemon state */
if (ditf->state == Daemon_Pre_Init) {
-
ERROR("[API %s] Bad call to 'afb_daemon_event_broadcast(%s, %s)', must not be in PreInit", ditf->api, name, json_object_to_json_string(object));
errno = EINVAL;
return 0;
diff --git a/src/afb-monitor.c b/src/afb-monitor.c
index 937e2160..168b13de 100644
--- a/src/afb-monitor.c
+++ b/src/afb-monitor.c
@@ -148,7 +148,7 @@ static void set_verbosity(struct json_object *spec)
/**
* Translate verbosity level to a protocol indication.
- * @param level the verbosity
+ * @param level the verbosity
* @return the encoded verbosity
*/
static struct json_object *encode_verbosity(int level)
diff --git a/src/afb-proto-ws.c b/src/afb-proto-ws.c
index 1f17cd77..24f70e5e 100644
--- a/src/afb-proto-ws.c
+++ b/src/afb-proto-ws.c
@@ -55,7 +55,7 @@ The client can require the following actions:
- ask for description
-The server must reply to the previous actions by
+The server must reply to the previous actions by
- answering success or failure of the call
diff --git a/src/afb-proto-ws.h b/src/afb-proto-ws.h
index 9cdf4902..a3d4a0dd 100644
--- a/src/afb-proto-ws.h
+++ b/src/afb-proto-ws.h
@@ -24,7 +24,7 @@ struct afb_proto_ws_subcall;
struct afb_proto_ws_describe;
struct afb_proto_ws_client_itf
-{
+{
void (*on_reply_success)(void *closure, void *request, struct json_object *result, const char *info);
void (*on_reply_fail)(void *closure, void *request, const char *status, const char *info);
diff --git a/src/afb-stub-ws.c b/src/afb-stub-ws.c
index 1f0a3e68..083f72b4 100644
--- a/src/afb-stub-ws.c
+++ b/src/afb-stub-ws.c
@@ -543,12 +543,12 @@ static void on_describe(void *closure, struct afb_proto_ws_describe *describe)
/*****************************************************/
static const struct afb_proto_ws_client_itf client_itf =
-{
+{
.on_reply_success = on_reply_success,
.on_reply_fail = on_reply_fail,
.on_event_create = on_event_create,
.on_event_remove = on_event_remove,
- .on_event_subscribe = on_event_subscribe,
+ .on_event_subscribe = on_event_subscribe,
.on_event_unsubscribe = on_event_unsubscribe,
.on_event_push = on_event_push,
.on_event_broadcast = on_event_broadcast,
diff --git a/src/afb-trace.c b/src/afb-trace.c
index b63756d3..8537081c 100644
--- a/src/afb-trace.c
+++ b/src/afb-trace.c
@@ -960,7 +960,7 @@ static void trace_cleanup(struct afb_trace *trace)
psession = &trace->sessions;
while ((session = *psession)) {
/* search for session */
- for (hook = NULL, i = 0 ; !hook && i < Trace_Type_Count ; i++)
+ for (hook = NULL, i = 0 ; !hook && i < Trace_Type_Count ; i++)
for (hook = trace->hooks[i] ; hook && hook->session != session ; hook = hook->next);
/* keep or free whether used or not */
if (hook)
@@ -976,7 +976,7 @@ static void trace_cleanup(struct afb_trace *trace)
ptag = &trace->tags;
while ((tag = *ptag)) {
/* search for tag */
- for (hook = NULL, i = 0 ; !hook && i < Trace_Type_Count ; i++)
+ for (hook = NULL, i = 0 ; !hook && i < Trace_Type_Count ; i++)
for (hook = trace->hooks[i] ; hook && hook->tag != tag ; hook = hook->next);
/* keep or free whether used or not */
if (hook)
@@ -990,7 +990,7 @@ static void trace_cleanup(struct afb_trace *trace)
pevent = &trace->events;
while ((event = *pevent)) {
/* search for event */
- for (hook = NULL, i = 0 ; !hook && i < Trace_Type_Count ; i++)
+ for (hook = NULL, i = 0 ; !hook && i < Trace_Type_Count ; i++)
for (hook = trace->hooks[i] ; hook && hook->event != event ; hook = hook->next);
/* keep or free whether used or not */
if (hook)
diff --git a/src/genskel/exprefs.c b/src/genskel/exprefs.c
index 8d41cd5a..4ea44b4d 100644
--- a/src/genskel/exprefs.c
+++ b/src/genskel/exprefs.c
@@ -34,7 +34,7 @@
* "b": "int"
* }
* }
- *
+ *
* Invocation: program [file|-]...
*
* without arguments, it reads the input.
@@ -80,7 +80,7 @@ struct json_object *search(const char *path)
d = strtok(d, "/");
while(i && d) {
if (!json_object_object_get_ex(i, d, &i))
- return NULL;
+ return NULL;
d = strtok(NULL, "/");
}
return i;
@@ -94,7 +94,7 @@ struct json_object *expand(struct path path)
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)) {
@@ -192,7 +192,7 @@ int main(int ac, char **av)
process("-");
else {
do { process(*av); } while(*++av);
- }
+ }
return 0;
}
diff --git a/src/genskel/genskel.c b/src/genskel/genskel.c
index 8b179aa3..62dfe3f4 100644
--- a/src/genskel/genskel.c
+++ b/src/genskel/genskel.c
@@ -34,7 +34,7 @@
* "b": "int"
* }
* }
- *
+ *
* 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))
- return NULL;
+ return NULL;
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 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)) {
@@ -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();
- }
+ }
asprintf(&b, "&_afb_auths_v2_%s[%d]", capi, json_object_array_length(a_perms));
x = json_object_new_string(desc);
@@ -698,7 +698,7 @@ int main(int ac, char **av)
process("-");
else {
do { process(*av); } while(*++av);
- }
+ }
return 0;
}
diff --git a/src/genskel/json2c.c b/src/genskel/json2c.c
index cb541bfd..109b6ee9 100644
--- a/src/genskel/json2c.c
+++ b/src/genskel/json2c.c
@@ -34,7 +34,7 @@
* "b": "int"
* }
* }
- *
+ *
* Invocation: program [file|-]...
*
* without arguments, it reads the input.
@@ -167,7 +167,7 @@ int main(int ac, char **av)
process("-");
else {
do { process(*av); } while(*++av);
- }
+ }
return 0;
}
diff --git a/src/jobs.c b/src/jobs.c
index ed812f81..347ad5ca 100644
--- a/src/jobs.c
+++ b/src/jobs.c
@@ -674,7 +674,7 @@ struct sd_event *jobs_get_sd_event()
ERROR("creation of sd_event failed: %m");
events = NULL;
errno = -rc;
- }
+ }
}
}
}
diff --git a/src/locale-root.c b/src/locale-root.c
index c9cdf7dd..38d488dc 100644
--- a/src/locale-root.c
+++ b/src/locale-root.c
@@ -146,7 +146,7 @@ static struct locale_folder *search_folder(struct locale_container *container, c
return f;
if (c >= 0)
high = mid;
- else
+ else
low = mid + 1;
}
return NULL;
diff --git a/src/main.c b/src/main.c
index 6ec392a2..e2e8ce3e 100644
--- a/src/main.c
+++ b/src/main.c
@@ -283,7 +283,6 @@ static struct afb_hsrv *start_http_server()
/*---------------------------------------------------------
| execute_command
- |
+--------------------------------------------------------- */
static void on_sigchld(int signum, siginfo_t *info, void *uctx)
diff --git a/src/tests/test-thread.sh b/src/tests/test-thread.sh
index a7bb45af..4ece13c0 100755
--- a/src/tests/test-thread.sh
+++ b/src/tests/test-thread.sh
@@ -1,4 +1,4 @@
#!/bin/sh
-cc test-thread.c ../afb-thread.c ../verbose.c ../sig-monitor.c ../jobs.c -o test-thread -lrt -lpthread -lsystemd -I../../include -g
+cc test-thread.c ../afb-thread.c ../verbose.c ../sig-monitor.c ../jobs.c -o test-thread -lrt -lpthread -lsystemd -I../../include -g
./test-thread
diff --git a/src/wrap-json.c b/src/wrap-json.c
index 164e127d..9bb8d192 100644
--- a/src/wrap-json.c
+++ b/src/wrap-json.c
@@ -718,7 +718,7 @@ void p(const char *desc, ...)
va_start(args, desc);
rc = wrap_json_vpack(&result, desc, args);
va_end(args);
- if (!rc)
+ if (!rc)
printf(" SUCCESS %s\n\n", json_object_to_json_string(result));
else
printf(" ERROR[char %d err %d] %s\n\n", wrap_json_get_error_position(rc), wrap_json_get_error_code(rc), wrap_json_get_error_string(rc));
@@ -749,7 +749,7 @@ void u(const char *value, const char *desc, ...)
va_start(args, desc);
rc = wrap_json_vunpack(obj, desc, args);
va_end(args);
- if (rc)
+ if (rc)
printf(" ERROR[char %d err %d] %s\n\n", wrap_json_get_error_position(rc), wrap_json_get_error_code(rc), wrap_json_get_error_string(rc));
else {
value = NULL;