We are going to want to add another call site.
No functional change.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
static const union icmpinfofield icmp_noinfo;
static const union icmpinfofield icmp_noinfo;
+static const char *sender_name(struct netlink_client *sender /* or NULL */)
+{
+ return sender?sender->name:"(local)";
+}
+
static void netlink_packet_deliver(struct netlink *st,
struct netlink_client *client,
struct buffer_if *buf);
static void netlink_packet_deliver(struct netlink *st,
struct netlink_client *client,
struct buffer_if *buf);
{
if (buf->size < (int)sizeof(struct iphdr)) {
Message(M_ERR,"%s: trying to deliver a too-short packet"
{
if (buf->size < (int)sizeof(struct iphdr)) {
Message(M_ERR,"%s: trying to deliver a too-short packet"
- " from %s!\n",st->name, sender?sender->name:"(local)");
+ " from %s!\n",st->name, sender_name(sender));