Fix indentation.
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Sun, 23 Dec 2012 06:52:50 +0000 (06:52 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Sun, 23 Dec 2012 06:52:50 +0000 (06:52 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@46712 f5534014-38df-0310-8fa8-9805f1628bb7

dumpcap.c

index 0eb959c0096d5281bac111a0a08d0e1963e594a9..7e21c152457ab45ad78291eed388e8fa30629df2 100644 (file)
--- a/dumpcap.c
+++ b/dumpcap.c
@@ -2306,44 +2306,42 @@ cap_pipe_dispatch(loop_data *ld, pcap_options *pcap_opts, guchar *data, char *er
         /* Fall through */
 
     case STATE_READ_REC_HDR:
-      if ((pcap_opts->from_cap_socket)
+        if ((pcap_opts->from_cap_socket)
 #ifndef _WIN32
-         || 1
+           || 1
 #endif
-         )
-      {
-        b = cap_pipe_read(pcap_opts->cap_pipe_fd, ((char *)&pcap_opts->cap_pipe_rechdr)+pcap_opts->cap_pipe_bytes_read,
+           ) {
+            b = cap_pipe_read(pcap_opts->cap_pipe_fd, ((char *)&pcap_opts->cap_pipe_rechdr)+pcap_opts->cap_pipe_bytes_read,
                  pcap_opts->cap_pipe_bytes_to_read - pcap_opts->cap_pipe_bytes_read, pcap_opts->from_cap_socket);
-        if (b <= 0) {
-            if (b == 0)
-                result = PD_PIPE_EOF;
-            else
-                result = PD_PIPE_ERR;
-            break;
+            if (b <= 0) {
+                if (b == 0)
+                    result = PD_PIPE_EOF;
+                else
+                    result = PD_PIPE_ERR;
+                break;
+            }
+            pcap_opts->cap_pipe_bytes_read += b;
         }
-        pcap_opts->cap_pipe_bytes_read += b;
-      }
 #ifdef _WIN32
-      else
-      {
+        else {
 #if GLIB_CHECK_VERSION(2,31,18)
-        q_status = g_async_queue_timeout_pop(pcap_opts->cap_pipe_done_q, PIPE_READ_TIMEOUT);
+            q_status = g_async_queue_timeout_pop(pcap_opts->cap_pipe_done_q, PIPE_READ_TIMEOUT);
 #else
-        g_get_current_time(&wait_time);
-        g_time_val_add(&wait_time, PIPE_READ_TIMEOUT);
-        q_status = g_async_queue_timed_pop(pcap_opts->cap_pipe_done_q, &wait_time);
+            g_get_current_time(&wait_time);
+            g_time_val_add(&wait_time, PIPE_READ_TIMEOUT);
+            q_status = g_async_queue_timed_pop(pcap_opts->cap_pipe_done_q, &wait_time);
 #endif
-        if (pcap_opts->cap_pipe_err == PIPEOF) {
-            result = PD_PIPE_EOF;
-            break;
-        } else if (pcap_opts->cap_pipe_err == PIPERR) {
-            result = PD_PIPE_ERR;
-            break;
-        }
-        if (!q_status) {
-            return 0;
+            if (pcap_opts->cap_pipe_err == PIPEOF) {
+                result = PD_PIPE_EOF;
+                break;
+            } else if (pcap_opts->cap_pipe_err == PIPERR) {
+                result = PD_PIPE_ERR;
+                break;
+            }
+            if (!q_status) {
+                return 0;
+            }
         }
-      }
 #endif
         if ((pcap_opts->cap_pipe_bytes_read) < pcap_opts->cap_pipe_bytes_to_read)
             return 0;
@@ -2368,45 +2366,43 @@ cap_pipe_dispatch(loop_data *ld, pcap_options *pcap_opts, guchar *data, char *er
         /* Fall through */
 
     case STATE_READ_DATA:
-      if ((pcap_opts->from_cap_socket)
+        if ((pcap_opts->from_cap_socket)
 #ifndef _WIN32
-         || 1
+           || 1
 #endif
-         )
-      {
-        b = cap_pipe_read(pcap_opts->cap_pipe_fd, data+pcap_opts->cap_pipe_bytes_read,
+           ) {
+            b = cap_pipe_read(pcap_opts->cap_pipe_fd, data+pcap_opts->cap_pipe_bytes_read,
                  pcap_opts->cap_pipe_bytes_to_read - pcap_opts->cap_pipe_bytes_read, pcap_opts->from_cap_socket);
-        if (b <= 0) {
-            if (b == 0)
-                result = PD_PIPE_EOF;
-            else
-                result = PD_PIPE_ERR;
-            break;
+            if (b <= 0) {
+                if (b == 0)
+                    result = PD_PIPE_EOF;
+                else
+                    result = PD_PIPE_ERR;
+                break;
+            }
+            pcap_opts->cap_pipe_bytes_read += b;
         }
-        pcap_opts->cap_pipe_bytes_read += b;
-      }
 #ifdef _WIN32
-      else
-      {
+        else {
 
 #if GLIB_CHECK_VERSION(2,31,18)
-        q_status = g_async_queue_timeout_pop(pcap_opts->cap_pipe_done_q, PIPE_READ_TIMEOUT);
+            q_status = g_async_queue_timeout_pop(pcap_opts->cap_pipe_done_q, PIPE_READ_TIMEOUT);
 #else
-        g_get_current_time(&wait_time);
-        g_time_val_add(&wait_time, PIPE_READ_TIMEOUT);
-        q_status = g_async_queue_timed_pop(pcap_opts->cap_pipe_done_q, &wait_time);
+            g_get_current_time(&wait_time);
+            g_time_val_add(&wait_time, PIPE_READ_TIMEOUT);
+            q_status = g_async_queue_timed_pop(pcap_opts->cap_pipe_done_q, &wait_time);
 #endif
-        if (pcap_opts->cap_pipe_err == PIPEOF) {
-            result = PD_PIPE_EOF;
-            break;
-        } else if (pcap_opts->cap_pipe_err == PIPERR) {
-            result = PD_PIPE_ERR;
-            break;
-        }
-        if (!q_status) {
-            return 0;
+            if (pcap_opts->cap_pipe_err == PIPEOF) {
+                result = PD_PIPE_EOF;
+                break;
+            } else if (pcap_opts->cap_pipe_err == PIPERR) {
+                result = PD_PIPE_ERR;
+                break;
+            }
+            if (!q_status) {
+                return 0;
+            }
         }
-      }
 #endif
         if ((pcap_opts->cap_pipe_bytes_read) < pcap_opts->cap_pipe_bytes_to_read)
             return 0;