]> git.meshlink.io Git - catta/blobdiff - avahi-compat-howl/address.c
from now on we enforce a strict whitespace regime
[catta] / avahi-compat-howl / address.c
index 6f26d1aa9e02542ac12ee327ebe37c14e4870326..3805a61f0cfdbb730ba96b806927cc9f7490db1e 100644 (file)
@@ -2,17 +2,17 @@
 
 /***
   This file is part of avahi.
+
   avahi is free software; you can redistribute it and/or modify it
   under the terms of the GNU Lesser General Public License as
   published by the Free Software Foundation; either version 2.1 of the
   License, or (at your option) any later version.
+
   avahi is distributed in the hope that it will be useful, but WITHOUT
   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
   or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
   Public License for more details.
+
   You should have received a copy of the GNU Lesser General Public
   License along with avahi; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
@@ -31,8 +31,9 @@
 #include <arpa/inet.h>
 #include <sys/types.h>
 
-#include <howl.h>
+#include <avahi-common/gccmacro.h>
 
+#include "howl.h"
 #include "warn.h"
 
 sw_ipv4_address sw_ipv4_address_any(void) {
@@ -84,10 +85,10 @@ sw_result sw_ipv4_address_init_from_name(
     assert(name);
 
     AVAHI_WARN_LINKAGE;
-    
+
     if (!(he = gethostbyname(name)))
         return SW_E_UNKNOWN;
-    
+
     self->m_addr = *(uint32_t*) he->h_addr;
     return SW_OKAY;
 }
@@ -112,7 +113,7 @@ sw_result sw_ipv4_address_init_from_this_host(sw_ipv4_address *self) {
     assert(self);
 
     AVAHI_WARN_LINKAGE;
-    
+
     /* This is so fucked up ... */
 
     memset(&sa, 0, sizeof(sa));
@@ -134,16 +135,16 @@ sw_result sw_ipv4_address_init_from_this_host(sw_ipv4_address *self) {
     close(fd);
 
     self->m_addr = sa.sin_addr.s_addr;
-    
+
     return SW_OKAY;
 }
 
-sw_result sw_ipv4_address_fina(sw_ipv4_address self) {
+sw_result sw_ipv4_address_fina(AVAHI_GCC_UNUSED sw_ipv4_address self) {
 
     AVAHI_WARN_LINKAGE;
 
     /* This is ridiculous ... */
-    
+
     return SW_OKAY;
 }
 
@@ -169,10 +170,10 @@ sw_string sw_ipv4_address_name(
 
     if (len < INET_ADDRSTRLEN)
         return NULL;
-    
+
     if (!(inet_ntop(AF_INET, &self.m_addr, name, len)))
         return NULL;
-            
+
     return name;
 }
 
@@ -186,9 +187,9 @@ sw_result sw_ipv4_address_decompose(
     uint32_t a;
 
     AVAHI_WARN_LINKAGE;
-    
+
     a = ntohl(self.m_addr);
-    
+
     assert(a1);
     assert(a2);
     assert(a3);
@@ -198,7 +199,7 @@ sw_result sw_ipv4_address_decompose(
     *a2 = (uint8_t) (a >> 16);
     *a3 = (uint8_t) (a >> 8);
     *a4 = (uint8_t) (a);
-        
+
     return SW_OKAY;
 }