Selaa lähdekoodia

rtl_test: use static instead of global var

Signed-off-by: Steve Markgraf <steve@steve-m.de>
Steve Markgraf 11 vuotta sitten
vanhempi
commit
f17818f737
1 muutettua tiedostoa jossa 1 lisäystä ja 2 poistoa
  1. 1 2
      src/rtl_test.c

+ 1 - 2
src/rtl_test.c

@@ -102,12 +102,11 @@ static void sighandler(int signum)
 }
 #endif
 
-uint8_t bcnt, uninit = 1;
-
 static void rtlsdr_callback(unsigned char *buf, uint32_t len, void *ctx)
 {
 	uint32_t i, lost = 0;
 	int64_t ns;
+	static uint8_t bcnt, uninit = 1;
 
 	if (uninit) {
 		bcnt = buf[0];