chiark / gitweb /
resolved: add more const
authorLennart Poettering <lennart@poettering.net>
Fri, 18 Jul 2014 11:59:49 +0000 (13:59 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 18 Jul 2014 12:01:01 +0000 (14:01 +0200)
src/resolve/resolved-dns-server.c
src/resolve/resolved-dns-server.h

index 4e0220b7d855d970185a89cd1a201dc36ab068cc..07754a0bdb436174fe388b9badec354b3915b661 100644 (file)
@@ -27,7 +27,7 @@ int dns_server_new(
                 DnsServerSource source,
                 Link *l,
                 unsigned char family,
-                union in_addr_union *in_addr) {
+                const union in_addr_union *in_addr) {
 
         DnsServer *s, *tail;
 
index adceb868a32576fd6869cd9ae301c2df5384e880..781e237627c5bae329510dc093cc03ecc351698e 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include "in-addr-util.h"
+
 typedef struct DnsServer DnsServer;
 typedef enum DnsServerSource DnsServerSource;
 
-#include "in-addr-util.h"
 #include "resolved.h"
 #include "resolved-link.h"
 #include "resolved-dns-server.h"
@@ -40,12 +41,12 @@ struct DnsServer {
         Manager *manager;
         DnsServerSource source;
 
+        Link *link;
+
         unsigned char family;
         union in_addr_union address;
 
-        bool marked;
-
-        Link *link;
+        bool marked:1;
 
         LIST_FIELDS(DnsServer, servers);
 };
@@ -56,6 +57,6 @@ int dns_server_new(
                 DnsServerSource source,
                 Link *l,
                 unsigned char family,
-                union in_addr_union *in_addr);
+                const union in_addr_union *address);
 
 DnsServer* dns_server_free(DnsServer *s);