]> git.gag.com Git - debian/gnuradio/commitdiff
removed extra indentation. No change in functionality
authoreb <eb@221aa14e-8319-0410-a670-987f0aec2ac5>
Mon, 27 Oct 2008 00:20:10 +0000 (00:20 +0000)
committereb <eb@221aa14e-8319-0410-a670-987f0aec2ac5>
Mon, 27 Oct 2008 00:20:10 +0000 (00:20 +0000)
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@9861 221aa14e-8319-0410-a670-987f0aec2ac5

usrp2/firmware/lib/dbsm.c

index 5e2042bed74046232ba7a6d65c3a9dfa61f6302d..b11d16824aafa8939702b2a83d797d8cc2d883a2 100644 (file)
@@ -177,50 +177,48 @@ dbsm_process_helper(dbsm_t *sm, int buf_this)
 {
   int buf_other = buf_this ^ 1;
 
-  if (1){
-    bp_clear_buf(buf_this);
-
-    if (buffer_state[buf_this] == BS_FILLING){
-      buffer_state[buf_this] = BS_FULL;
-      //
-      // does s/w handle this packet?
-      //
-      if (sm->inspect(sm, buf_this)){
-       // s/w handled the packet; refill the buffer
-       dbsm_receive_to_buf(sm, buf_this);
-       buffer_state[buf_this] = BS_FILLING;
-      }
+  bp_clear_buf(buf_this);
 
-      else {   // s/w didn't handle this; pass it on
+  if (buffer_state[buf_this] == BS_FILLING){
+    buffer_state[buf_this] = BS_FULL;
+    //
+    // does s/w handle this packet?
+    //
+    if (sm->inspect(sm, buf_this)){
+      // s/w handled the packet; refill the buffer
+      dbsm_receive_to_buf(sm, buf_this);
+      buffer_state[buf_this] = BS_FILLING;
+    }
 
-       if(buffer_state[buf_other] == BS_EMPTY){
-         dbsm_receive_to_buf(sm, buf_other);
-         buffer_state[buf_other] = BS_FILLING;
-       }
-       else
-         sm->rx_idle = true;
+    else {     // s/w didn't handle this; pass it on
 
-       if (sm->tx_idle){
-         sm->tx_idle = false;
-         dbsm_send_from_buf(sm, buf_this);
-         buffer_state[buf_this] = BS_EMPTYING;
-       }
-      }
-    }
-    else {  // buffer was emptying
-      buffer_state[buf_this] = BS_EMPTY;
-      if (sm->rx_idle){
-       sm->rx_idle = false;
-       dbsm_receive_to_buf(sm, buf_this);
-       buffer_state[buf_this] = BS_FILLING;
-      }
-      if (buffer_state[buf_other] == BS_FULL){
-       dbsm_send_from_buf(sm, buf_other);
-       buffer_state[buf_other] = BS_EMPTYING;
+      if(buffer_state[buf_other] == BS_EMPTY){
+       dbsm_receive_to_buf(sm, buf_other);
+       buffer_state[buf_other] = BS_FILLING;
       }
       else
-       sm->tx_idle = true;
+       sm->rx_idle = true;
+
+      if (sm->tx_idle){
+       sm->tx_idle = false;
+       dbsm_send_from_buf(sm, buf_this);
+       buffer_state[buf_this] = BS_EMPTYING;
+      }
+    }
+  }
+  else {  // buffer was emptying
+    buffer_state[buf_this] = BS_EMPTY;
+    if (sm->rx_idle){
+      sm->rx_idle = false;
+      dbsm_receive_to_buf(sm, buf_this);
+      buffer_state[buf_this] = BS_FILLING;
+    }
+    if (buffer_state[buf_other] == BS_FULL){
+      dbsm_send_from_buf(sm, buf_other);
+      buffer_state[buf_other] = BS_EMPTYING;
     }
+    else
+      sm->tx_idle = true;
   }
 }