summaryrefslogtreecommitdiff
path: root/nhrpd/reqid.c
diff options
context:
space:
mode:
authorLou Berger <lberger@labn.net>2018-03-06 14:02:52 -0500
committerLou Berger <lberger@labn.net>2018-03-06 14:04:32 -0500
commit996c93142d3abfab0f6d6c800474e22a8cfbdbc5 (patch)
tree2b28846d256c84cf7b7f1a8988fb3267c8611722 /nhrpd/reqid.c
parent3380418fa10556ef2c9139d09b9a435db64dc392 (diff)
*: conform with COMMUNITY.md formatting rules, via 'make indent'
Signed-off-by: Lou Berger <lberger@labn.net>
Diffstat (limited to 'nhrpd/reqid.c')
-rw-r--r--nhrpd/reqid.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/nhrpd/reqid.c b/nhrpd/reqid.c
index e5bd45a8f4..e8ad518e58 100644
--- a/nhrpd/reqid.c
+++ b/nhrpd/reqid.c
@@ -14,18 +14,19 @@ static int nhrp_reqid_cmp(const void *data, const void *key)
return a->request_id == b->request_id;
}
-uint32_t nhrp_reqid_alloc(struct nhrp_reqid_pool *p, struct nhrp_reqid *r, void (*cb)(struct nhrp_reqid *, void *))
+uint32_t nhrp_reqid_alloc(struct nhrp_reqid_pool *p, struct nhrp_reqid *r,
+ void (*cb)(struct nhrp_reqid *, void *))
{
if (!p->reqid_hash) {
- p->reqid_hash = hash_create(nhrp_reqid_key,
- nhrp_reqid_cmp,
+ p->reqid_hash = hash_create(nhrp_reqid_key, nhrp_reqid_cmp,
"NHRP reqid Hash");
p->next_request_id = 1;
}
if (r->cb != cb) {
r->request_id = p->next_request_id;
- if (++p->next_request_id == 0) p->next_request_id = 1;
+ if (++p->next_request_id == 0)
+ p->next_request_id = 1;
r->cb = cb;
hash_get(p->reqid_hash, r, hash_alloc_intern);
}
@@ -43,9 +44,8 @@ void nhrp_reqid_free(struct nhrp_reqid_pool *p, struct nhrp_reqid *r)
struct nhrp_reqid *nhrp_reqid_lookup(struct nhrp_reqid_pool *p, uint32_t reqid)
{
struct nhrp_reqid key;
- if (!p->reqid_hash) return 0;
+ if (!p->reqid_hash)
+ return 0;
key.request_id = reqid;
return hash_lookup(p->reqid_hash, &key);
}
-
-