Skip to content

Commit d580d26

Browse files
Shigeru Yoshidadavem330
authored andcommitted
tipc: Remove redundant call to TLV_SPACE()
The purpose of TLV_SPACE() is to add the TLV descriptor size to the size of the TLV value passed as argument and align the resulting size to TLV_ALIGNTO. tipc_tlv_alloc() calls TLV_SPACE() on its argument. In other words, tipc_tlv_alloc() takes its argument as the size of the TLV value. So the call to TLV_SPACE() in tipc_get_err_tlv() is redundant. Let's remove this redundancy. Acked-by: Paolo Abeni <[email protected]> Signed-off-by: Shigeru Yoshida <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 7c93d17 commit d580d26

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/tipc/netlink_compat.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ static struct sk_buff *tipc_get_err_tlv(char *str)
168168
int str_len = strlen(str) + 1;
169169
struct sk_buff *buf;
170170

171-
buf = tipc_tlv_alloc(TLV_SPACE(str_len));
171+
buf = tipc_tlv_alloc(str_len);
172172
if (buf)
173173
tipc_add_tlv(buf, TIPC_TLV_ERROR_STRING, str, str_len);
174174

0 commit comments

Comments
 (0)