aboutsummaryrefslogtreecommitdiffstats
path: root/include/afb/afb-req-common.h
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2017-06-07 18:38:26 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2017-06-12 07:54:40 +0200
commit2fa03e0163e48d3ccbff9d953900250b52787968 (patch)
tree01a8d0819808b85b8f63a09ade1b9e348a8363b7 /include/afb/afb-req-common.h
parent2f876805d8179fe46a0984deaa4e716926e6a96b (diff)
Removes reference to NULL in includes
Change-Id: I94b2d57b8234f607167488afd24364920f9624f0 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'include/afb/afb-req-common.h')
-rw-r--r--include/afb/afb-req-common.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/afb/afb-req-common.h b/include/afb/afb-req-common.h
index 8ff1b39b..df37739f 100644
--- a/include/afb/afb-req-common.h
+++ b/include/afb/afb-req-common.h
@@ -90,7 +90,7 @@ struct afb_req
*/
static inline int afb_req_is_valid(struct afb_req req)
{
- return req.itf != NULL;
+ return !!req.itf;
}
/*
@@ -253,7 +253,7 @@ static inline void afb_req_context_set(struct afb_req req, void *context, void (
static inline void *afb_req_context(struct afb_req req, void *(*create_context)(), void (*free_context)(void*))
{
void *result = afb_req_context_get(req);
- if (result == NULL) {
+ if (!result) {
result = create_context();
afb_req_context_set(req, result, free_context);
}
@@ -268,7 +268,7 @@ static inline void *afb_req_context(struct afb_req req, void *(*create_context)(
*/
static inline void afb_req_context_clear(struct afb_req req)
{
- afb_req_context_set(req, NULL, NULL);
+ afb_req_context_set(req, 0, 0);
}
/*