On 12/10/2012 02:23 PM, Laine Stump wrote:
This shortens the name of the structs for srv and txt, and their
instances in virNetworkDNSDef, to be more compact and uniform with the
naming of the dns host array.
---
src/conf/network_conf.c | 102 ++++++++++++++++++++++----------------------
src/conf/network_conf.h | 32 +++++++-------
src/network/bridge_driver.c | 34 +++++++--------
3 files changed, 85 insertions(+), 83 deletions(-)
ACK; mostly mechanical.
@@ -95,21 +95,23 @@ struct _virNetworkDNSSrvRecordsDef {
int weight;
};
-struct _virNetworkDNSHostsDef {
+typedef struct _virNetworkDNSHostDef virNetworkDNSHostDef;
+typedef virNetworkDNSHostDef *virNetworkDNSHostDefPtr;
+struct _virNetworkDNSHostDef {
virSocketAddr ip;
int nnames;
char **names;
};
-typedef struct _virNetworkDNSHostsDef *virNetworkDNSHostsDefPtr;
-
+typedef struct _virNetworkDNSDef virNetworkDNSDef;
+typedef virNetworkDNSDef *virNetworkDNSDefPtr;
struct _virNetworkDNSDef {
- unsigned int ntxtrecords;
- virNetworkDNSTxtRecordsDefPtr txtrecords;
- unsigned int nhosts;
- virNetworkDNSHostsDefPtr hosts;
- unsigned int nsrvrecords;
- virNetworkDNSSrvRecordsDefPtr srvrecords;
+ size_t ntxts;
+ virNetworkDNSTxtDefPtr txts;
+ size_t nhosts;
+ virNetworkDNSHostDefPtr hosts;
+ size_t nsrvs;
+ virNetworkDNSSrvDefPtr srvs;
You are also canonicalizing on size_t instead of unsigned int for array
lengths; may be worth mentioning in the commit message, but still okay
for this patch (doesn't change my ack).
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org