mesh: Use l_malloc instead of l_new with a cast
authorMarcel Holtmann <marcel@holtmann.org>
Sat, 16 Feb 2019 07:23:43 +0000 (08:23 +0100)
committerAnupam Roy <anupam.r@samsung.com>
Tue, 17 Dec 2019 14:14:38 +0000 (19:44 +0530)
Change-Id: Ie2308b4cf1a15428aefe65e39c21df6da2627006
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
mesh/net.c

index 4f30566..673814b 100644 (file)
@@ -1287,7 +1287,7 @@ static struct mesh_friend_msg *mesh_friend_msg_new(uint8_t seg_max)
                                        sizeof(struct mesh_friend_seg_one);
 
                size += (seg_max + 1) * sizeof(struct mesh_friend_seg_12);
-               frnd_msg =  (struct mesh_friend_msg *) l_new(uint8_t, size);
+               frnd_msg = l_malloc(size);
        } else
                frnd_msg = l_new(struct mesh_friend_msg, 1);