From 8ba15ad0b1a132a8126a4e094af244aa14cf5d60 Mon Sep 17 00:00:00 2001 From: Radoslav Gerganov Date: Fri, 5 Aug 2016 16:53:36 +0300 Subject: [PATCH] Make the 'do_exit' flag static Both libhackrf and hackrf_transfer are using boolean flag named "do_exit" which is not static. This is problematic because the flag is used for different things. This patch fixes the problem by making the flag static in both places. --- host/hackrf-tools/src/hackrf_transfer.c | 2 +- host/libhackrf/src/hackrf.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/host/hackrf-tools/src/hackrf_transfer.c b/host/hackrf-tools/src/hackrf_transfer.c index 8c1b418c..a0c5d637 100644 --- a/host/hackrf-tools/src/hackrf_transfer.c +++ b/host/hackrf-tools/src/hackrf_transfer.c @@ -288,7 +288,7 @@ char* u64toa(uint64_t val, t_u64toa* str) return res; } -volatile bool do_exit = false; +static volatile bool do_exit = false; FILE* fd = NULL; volatile uint32_t byte_count = 0; diff --git a/host/libhackrf/src/hackrf.c b/host/libhackrf/src/hackrf.c index 2f309c38..57e0b405 100644 --- a/host/libhackrf/src/hackrf.c +++ b/host/libhackrf/src/hackrf.c @@ -117,7 +117,7 @@ static const max2837_ft_t max2837_ft[] = { { 0 } }; -volatile bool do_exit = false; +static volatile bool do_exit = false; static const uint16_t hackrf_usb_vid = 0x1d50; static const uint16_t hackrf_jawbreaker_usb_pid = 0x604b;