ell.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH] genl: Return false, not NULL, for boolean return.
@ 2021-03-12 19:04 Ossama Othman
  2021-03-12 19:32 ` Denis Kenzior
  0 siblings, 1 reply; 2+ messages in thread
From: Ossama Othman @ 2021-03-12 19:04 UTC (permalink / raw)
  To: ell

[-- Attachment #1: Type: text/plain, Size: 789 bytes --]

From: Ossama Othman <ossama.othman@gmail.com>

The return type of the l_genl_request_family() function is bool, not a
pointer.  Return false instead of NULL to match the return type.
---
 ell/genl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ell/genl.c b/ell/genl.c
index 7e3f800..97457cf 100644
--- a/ell/genl.c
+++ b/ell/genl.c
@@ -1538,11 +1538,11 @@ LIB_EXPORT bool l_genl_request_family(struct l_genl *genl, const char *name,
 	struct family_request *req;
 
 	if (unlikely(!genl) || unlikely(!name))
-		return NULL;
+		return false;
 
 	len = strlen(name);
 	if (unlikely(strlen(name) >= GENL_NAMSIZ))
-		return NULL;
+		return false;
 
 	req = l_new(struct family_request, 1);
 	req->appeared_func = appeared_func;
-- 
2.25.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] genl: Return false, not NULL, for boolean return.
  2021-03-12 19:04 [PATCH] genl: Return false, not NULL, for boolean return Ossama Othman
@ 2021-03-12 19:32 ` Denis Kenzior
  0 siblings, 0 replies; 2+ messages in thread
From: Denis Kenzior @ 2021-03-12 19:32 UTC (permalink / raw)
  To: ell

[-- Attachment #1: Type: text/plain, Size: 380 bytes --]

Hi Ossama,

On 3/12/21 1:04 PM, Ossama Othman wrote:
> From: Ossama Othman <ossama.othman@gmail.com>
> 
> The return type of the l_genl_request_family() function is bool, not a
> pointer.  Return false instead of NULL to match the return type.
> ---
>   ell/genl.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 

Applied, thanks.

Regards,
-Denis

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-03-12 19:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-12 19:04 [PATCH] genl: Return false, not NULL, for boolean return Ossama Othman
2021-03-12 19:32 ` Denis Kenzior

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).