chiark / gitweb /
sd-rtnl: message - fix clang compile warning
authorTom Gundersen <teg@jklm.no>
Sat, 29 Mar 2014 22:52:03 +0000 (23:52 +0100)
committerTom Gundersen <teg@jklm.no>
Sat, 29 Mar 2014 22:52:03 +0000 (23:52 +0100)
src/libsystemd/sd-rtnl/rtnl-message.c

index cfce7659aae85c08aadfcfa5996f8b56b03607b8..5265184098c32c2e37b1d9715c984f5ef58791da 100644 (file)
@@ -1085,7 +1085,8 @@ int sd_rtnl_message_rewind(sd_rtnl_message *m) {
                                        &m->rta_offset_tb[m->n_containers],
                                        &m->rta_tb_size[m->n_containers],
                                        type_system->max,
-                                       (char*)NLMSG_DATA(m->hdr) + NLMSG_ALIGN(type->size),
+                                       (struct rtattr*)((uint8_t*)NLMSG_DATA(m->hdr) +
+                                                        NLMSG_ALIGN(type->size)),
                                        NLMSG_PAYLOAD(m->hdr, type->size));
                 if (r < 0)
                         return r;