ctdb-common: Use documented names for protocol family in socket()
[samba.git] / ctdb / utils / smnotify / smnotify.c
index d7fd54626e24c63214a4945c8e6894fabd717126..0cd61c7b2da164eff2d032112ca7455e589dadf5 100644 (file)
@@ -43,14 +43,14 @@ static int create_socket(const char *addr, int port)
        int s;
         struct sockaddr_in sock_in;
 
-       s = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP);
+       s = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
        if (s == -1) {
                printf("Failed to open local socket\n");
                exit(10);
        }
 
        bzero(&sock_in, sizeof(sock_in));
-       sock_in.sin_family = PF_INET;
+       sock_in.sin_family = AF_INET;
        sock_in.sin_port   = htons(port);
        inet_aton(addr, &sock_in.sin_addr);
        if (bind(s, (struct sockaddr *)&sock_in, sizeof(sock_in)) == -1) {
@@ -124,7 +124,7 @@ int main(int argc, const char *argv[])
 
        /* Setup a sockaddr_in for the client we want to notify */
        bzero(&sock_cl, sizeof(sock_cl));
-       sock_cl.sin_family = PF_INET;
+       sock_cl.sin_family = AF_INET;
        sock_cl.sin_port   = htons(clientport);
        inet_aton(client, &sock_cl.sin_addr);
 
@@ -137,7 +137,7 @@ int main(int argc, const char *argv[])
                exit(10);
        }
 
-       /* we dont want to wait for any reply */
+       /* we don't want to wait for any reply */
        w.tv_sec = 0;
        w.tv_usec = 0;
        clnt_control(clnt, CLSET_TIMEOUT, (char *)&w);