changeset 2688:fffdcae6654c libavformat

Reindent after last commit
author lucabe
date Wed, 31 Oct 2007 07:08:12 +0000
parents f4d24b10d33d
children 7d25b8de708d
files udp.c
diffstat 1 files changed, 21 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- a/udp.c	Wed Oct 31 07:02:30 2007 +0000
+++ b/udp.c	Wed Oct 31 07:08:12 2007 +0000
@@ -120,13 +120,14 @@
     if ((hostname) && (hostname[0] != '\0') && (hostname[0] != '?')) {
         node = hostname;
     }
-        memset(&hints, 0, sizeof(hints));
-        hints.ai_socktype = type;
-        hints.ai_family   = family;
-        hints.ai_flags = flags;
-        if ((error = getaddrinfo(node, service, &hints, &res))) {
-            av_log(NULL, AV_LOG_ERROR, "udp_ipv6_resolve_host: %s\n", gai_strerror(error));
-        }
+    memset(&hints, 0, sizeof(hints));
+    hints.ai_socktype = type;
+    hints.ai_family   = family;
+    hints.ai_flags = flags;
+    if ((error = getaddrinfo(node, service, &hints, &res))) {
+        av_log(NULL, AV_LOG_ERROR, "udp_ipv6_resolve_host: %s\n", gai_strerror(error));
+    }
+
     return res;
 }
 
@@ -153,23 +154,23 @@
     char hbuf[NI_MAXHOST];
     struct addrinfo *res0 = NULL, *res = NULL;
 
-        res0 = udp_ipv6_resolve_host(0, s->local_port, SOCK_DGRAM, AF_UNSPEC, AI_PASSIVE);
-        if (res0 == 0)
-            goto fail;
-        for (res = res0; res; res=res->ai_next) {
-            udp_fd = socket(res->ai_family, SOCK_DGRAM, 0);
-            if (udp_fd > 0) break;
-            perror("socket");
-        }
+    res0 = udp_ipv6_resolve_host(0, s->local_port, SOCK_DGRAM, AF_UNSPEC, AI_PASSIVE);
+    if (res0 == 0)
+        goto fail;
+    for (res = res0; res; res=res->ai_next) {
+        udp_fd = socket(res->ai_family, SOCK_DGRAM, 0);
+        if (udp_fd > 0) break;
+        perror("socket");
+    }
 
     if (udp_fd < 0)
         goto fail;
 
-        if (bind(udp_fd, res0->ai_addr, res0->ai_addrlen) < 0) {
-            perror("bind");
-            goto fail;
-        }
-        freeaddrinfo(res0);
+    if (bind(udp_fd, res0->ai_addr, res0->ai_addrlen) < 0) {
+        perror("bind");
+        goto fail;
+    }
+    freeaddrinfo(res0);
         res0 = NULL;
 
     addrlen = sizeof(clientaddr);