Imported Upstream version 3.2.2
[debian/gnuradio] / gnuradio-core / src / lib / general / gr_align_on_samplenumbers_ss.cc
index 4d4d99617b4e82b28b2c6f1a8769c7ca0117122a..241a33f5df8f70755dc0151208578dacfa107079 100644 (file)
@@ -28,6 +28,8 @@
 #include <gr_io_signature.h>
 #include <assert.h>
 #include <stdexcept>
+#include <string.h>
+#include <cstdio>
 
 //define ALIGN_ADVANCED_IMPLEMENTATION to have an alternative implementation of the align algoritm which exactly follows the align_interval spec.
 //It is more resource intensive, less tested and probably not needed
@@ -330,7 +332,7 @@ gr_align_on_samplenumbers_ss::general_work (int noutput_items,
     x_high16bits = uin[d_nchan*2];
     x_low16bits = uin[d_nchan*2+1];
     unsigned int ucounter_begin2 = x_high16bits<<16 | x_low16bits;
-    if((d_state[i].ucounter_begin+1)!=(ucounter_begin2))
+    if((d_state[i].ucounter_begin+1)!=(ucounter_begin2)){
       if(ucounter_begin2==0)
       {
 #ifdef DEBUG_TOCONSUME
@@ -341,6 +343,7 @@ gr_align_on_samplenumbers_ss::general_work (int noutput_items,
       {
         ePrintf("Error: counter not continuous.\n ucounter_begin[%i]=%i +1 !=  ucounter_begin2=%i\n",i,d_state[i].ucounter_begin,ucounter_begin2);
       }
+    }
       
     //diff_comp[i]=ucounter[i]-ucounter[0];
     //diff_min=std::min(diff[i],diff_min);