Use common net utility code (address and sockaddr manipulation).
[samba.git] / source3 / nmbd / nmbd_winsserver.c
index 5ee6e831382f365c39bd798a4c61ee630d154932..74bed684fdd24e5e5a203d5ebebe64e96a74190d 100644 (file)
@@ -701,7 +701,7 @@ bool initialise_wins(void)
                next_token_talloc(frame,&ptr,&ttl_str,NULL);
                for(i = 0; i < num_ips; i++) {
                        next_token_talloc(frame,&ptr, &ip_str, NULL);
-                       (void)interpret_addr2(&ip_list[i], ip_str);
+                       ip_list[i] = interpret_addr2(ip_str);
                }
                next_token_talloc(frame,&ptr,&nb_flags_str,NULL);
 
@@ -835,7 +835,7 @@ void wins_process_name_refresh_request( struct subnet_record *subrec,
        struct in_addr from_ip;
        struct in_addr our_fake_ip;
 
-       (void)interpret_addr2(&our_fake_ip, "0.0.0.0");
+       our_fake_ip = interpret_addr2("0.0.0.0");
        putip( (char *)&from_ip, &nmb->additional->rdata[2] );
 
        if(bcast) {
@@ -1142,7 +1142,7 @@ void wins_process_name_registration_request(struct subnet_record *subrec,
        bool registering_group_name = (nb_flags & NB_GROUP) ? True : False;
        struct in_addr our_fake_ip;
 
-       (void)interpret_addr2(&our_fake_ip, "0.0.0.0");
+       our_fake_ip = interpret_addr2("0.0.0.0");
        putip((char *)&from_ip,&nmb->additional->rdata[2]);
 
        if(bcast) {
@@ -1217,7 +1217,7 @@ to register name %s. Name already exists in WINS with source type %d.\n",
         */
 
        if(registering_group_name && (question->name_type != 0x1c)) {
-               (void)interpret_addr2(&from_ip, "255.255.255.255");
+               from_ip = interpret_addr2("255.255.255.255");
        }
 
        /*
@@ -1424,7 +1424,7 @@ static void wins_multihomed_register_query_success(struct subnet_record *subrec,
        int ttl;
        struct in_addr our_fake_ip;
 
-       (void)interpret_addr2(&our_fake_ip, "0.0.0.0");
+       our_fake_ip = interpret_addr2("0.0.0.0");
        memcpy((char *)&orig_reg_packet, userdata->data, sizeof(struct packet_struct *));
 
        nmb = &orig_reg_packet->packet.nmb;
@@ -1515,7 +1515,7 @@ void wins_process_multihomed_name_registration_request( struct subnet_record *su
        struct in_addr our_fake_ip;
        unstring qname;
 
-       (void)interpret_addr2(&our_fake_ip, "0.0.0.0");
+       our_fake_ip = interpret_addr2("0.0.0.0");
        putip((char *)&from_ip,&nmb->additional->rdata[2]);
 
        if(bcast) {
@@ -2141,7 +2141,7 @@ static int wins_processing_traverse_fn(TDB_CONTEXT *tdb, TDB_DATA kbuf, TDB_DATA
        struct name_record *namerec = NULL;
        struct in_addr our_fake_ip;
 
-       (void)interpret_addr2(&our_fake_ip, "0.0.0.0");
+       our_fake_ip = interpret_addr2("0.0.0.0");
        if (kbuf.dsize != sizeof(unstring) + 1) {
                return 0;
        }
@@ -2422,7 +2422,7 @@ void nmbd_wins_new_entry(struct messaging_context *msg,
        struct in_addr our_fake_ip;
        int i;
 
-       (void)interpret_addr2(&our_fake_ip, "0.0.0.0");
+       our_fake_ip = interpret_addr2("0.0.0.0");
        if (buf==NULL) {
                return;
        }