teknoraver / rpms / systemd

Forked from rpms/systemd 2 months ago
Clone
Blob Blame History Raw
From cedc611207b6a14cdbaf1d73e12b62ee55cc53de Mon Sep 17 00:00:00 2001
From: Tom Gundersen <teg@jklm.no>
Date: Mon, 1 Sep 2014 22:59:52 +0200
Subject: [PATCH] sd-rtnl: don't assign to unused variable

Reported by Thomas H.P. Andersen <phomes@gmail.com>.
---
 src/libsystemd/sd-rtnl/rtnl-message.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/libsystemd/sd-rtnl/rtnl-message.c b/src/libsystemd/sd-rtnl/rtnl-message.c
index 906a9de1c0..30e33584c4 100644
--- a/src/libsystemd/sd-rtnl/rtnl-message.c
+++ b/src/libsystemd/sd-rtnl/rtnl-message.c
@@ -531,7 +531,6 @@ static int add_rtattr(sd_rtnl_message *m, unsigned short type, const void *data,
                 /* if no data was passed, make sure we still initialize the padding
                    note that we can have data_length > 0 (used by some containers) */
                 padding = RTA_DATA(rta);
-                data_length = 0;
         }
 
         /* make sure also the padding at the end of the message is initialized */