Skip to contentSkip to conversation

trivial C99 designated initializer patch for net/netlink/af_netlink.c

PATCH New Art Haas 1 participant 1 message Oct 7, 2002

Subsystems (2)
lore
Share & tools
lore

Art Haas

author
#0 lore raw

PATCH 1/1 trivial C99 designated initializer patch for net/netlink/af_netlink.c

Hi.

The trivial patch below fixes a structure to use C99 designated initializers. The patch is against 2.5.41.

Art Haas

net/netlink/af_netlink.c renamed from net/netlink/af_netlink.c.old +2 -2
@@ -280,8 +280,8 @@
 	skb_queue_purge(&sk->write_queue);
 
 	if (nlk->pid && !nlk->groups) {
-		struct netlink_notify n = { protocol:sk->protocol,
-		                            pid:nlk->pid };
+		struct netlink_notify n = { .protocol = sk->protocol,
+		                            .pid = nlk->pid };
 		notifier_call_chain(&netlink_chain, NETLINK_URELEASE, &n);
 	}	
 	
Signature · 3 lines
They that can give up essential liberty to obtain a little temporary safety
deserve neither liberty nor safety.
 -- Benjamin Franklin, Historical Review of Pennsylvania, 1759