]> git.ipfire.org Git - thirdparty/man-pages.git/blobdiff - man3/getaddrinfo.3
s/-/\\-/
[thirdparty/man-pages.git] / man3 / getaddrinfo.3
index 89289d1d3f74ab1f19a0ae636e2e6bd1b202a138..f438005be98e79701218882deab5d62fe8c36a10 100644 (file)
@@ -499,13 +499,13 @@ main(int argc, char *argv[])
        If socket(2) (or bind(2)) fails, we (close the socket 
        and) try the next address. */
 
-    for (rp = result; rp != NULL; rp = rp->ai_next) {
-        sfd = socket(rp->ai_family, rp->ai_socktype, 
-                rp->ai_protocol);
-        if (sfd == -1)
+    for (rp = result; rp != NULL; rp = rp\->ai_next) {
+        sfd = socket(rp\->ai_family, rp\->ai_socktype, 
+                rp\->ai_protocol);
+        if (sfd == \-1)
             continue;
 
-        if (bind(sfd, rp->ai_addr, rp->ai_addrlen) == 0)
+        if (bind(sfd, rp\->ai_addr, rp\->ai_addrlen) == 0)
             break;                  /* Success */
 
         close(sfd);
@@ -524,7 +524,7 @@ main(int argc, char *argv[])
         peer_addr_len = sizeof(struct sockaddr_storage);
         nread = recvfrom(sfd, buf, BUF_SIZE, 0, 
                 (struct sockaddr *) &peer_addr, &peer_addr_len);
-        if (nread == -1)
+        if (nread == \-1)
             continue;               /* Ignore failed request */
 
         char host[NI_MAXHOST], service[NI_MAXSERV];
@@ -596,13 +596,13 @@ main(int argc, char *argv[])
        If socket() (or connect()) fails, we (close the socket 
        and) try the next address. */
 
-    for (rp = result; rp != NULL; rp = rp->ai_next) {
-        sfd = socket(rp->ai_family, rp->ai_socktype, 
-                     rp->ai_protocol);
-        if (sfd == -1)
+    for (rp = result; rp != NULL; rp = rp\->ai_next) {
+        sfd = socket(rp\->ai_family, rp\->ai_socktype, 
+                     rp\->ai_protocol);
+        if (sfd == \-1)
             continue;
         
-        if (connect(sfd, rp->ai_addr, rp->ai_addrlen) != -1)
+        if (connect(sfd, rp\->ai_addr, rp\->ai_addrlen) != \-1)
             break;                  /* Success */
 
         close(sfd);
@@ -615,7 +615,7 @@ main(int argc, char *argv[])
 
     freeaddrinfo(result);           /* No longer needed */
 
-    /* Send remaining command-line arguments as separate 
+    /* Send remaining command\-line arguments as separate 
        datagrams, and read responses from server */
 
     for (j = 3; j < argc; j++) {
@@ -634,7 +634,7 @@ main(int argc, char *argv[])
         }
         
         nread = read(sfd, buf, BUF_SIZE);
-        if (nread == -1) {
+        if (nread == \-1) {
             perror("read");
             exit(EXIT_FAILURE);
         }