From e3e5dd88eb621e859a34f02cc085cbc6c4c1ca4f Mon Sep 17 00:00:00 2001 From: Rasmus Villemoes <linux@rasmusvillemoes.dk> Date: Thu, 8 Jun 2017 12:56:46 +0200 Subject: [PATCH] lib/genl/family.c: fix if (x) y; else y; I'm not 100% sure this is the correct fix; maybe this really is supposed to return family->gf_maxattr, but this is an odd way of writing that. Anyway, comparing to the other genl_family_[gs]et functions, I suppose this is what was really meant. --- lib/genl/family.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/genl/family.c b/lib/genl/family.c index 0ba21cb..c98e5e1 100644 --- a/lib/genl/family.c +++ b/lib/genl/family.c @@ -330,7 +330,7 @@ uint32_t genl_family_get_maxattr(struct genl_family *family) if (family->ce_mask & FAMILY_ATTR_MAXATTR) return family->gf_maxattr; else - return family->gf_maxattr; + return 0; } void genl_family_set_maxattr(struct genl_family *family, uint32_t maxattr) -- 2.40.0