diff options
author | José Bollo <jose.bollo@iot.bzh> | 2016-03-31 23:15:45 +0200 |
---|---|---|
committer | José Bollo <jose.bollo@iot.bzh> | 2016-03-31 23:15:45 +0200 |
commit | c95f72616f59a317f72c58c0e5664992504a48e5 (patch) | |
tree | 9ca3029b00b5fd67434f769b7cb621b4c6741bcf /src/http-svc.c | |
parent | 1205c90cccd3144bab24b4b5fd8dcbf0d0e6b570 (diff) |
refactoring (in progress, tbf)
Change-Id: Id9a98da85bb838b9401dad48a6652207ab4db191
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/http-svc.c')
-rw-r--r-- | src/http-svc.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/http-svc.c b/src/http-svc.c index 9fa6e84c..706abbc5 100644 --- a/src/http-svc.c +++ b/src/http-svc.c @@ -175,11 +175,11 @@ static int afb_hreq_rest_api(struct afb_hreq *hreq, void *data) const char *api, *verb; size_t lenapi, lenverb; - api = hreq->tail; - lenapi = strspn(api, "/"); - verb = &hreq->tail[lenapi]; - verb = &verb[strcspn(verb, "/")]; - lenverb = strspn(verb, "/"); + api = &hreq->tail[strspn(hreq->tail, "/")]; + lenapi = strcspn(api, "/"); + verb = &api[lenapi]; + verb = &verb[strspn(verb, "/")]; + lenverb = strcspn(verb, "/"); if (!(*api && *verb && lenapi && lenverb)) return 0; |