File tree Expand file tree Collapse file tree 3 files changed +9
-6
lines changed
test/nanostack/unittest/service_libs/fhss Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -69,9 +69,9 @@ struct fhss_bs
69
69
uint8_t beacons_received_timer ;
70
70
uint8_t broadcast_start_superframe ;
71
71
uint8_t synch_infos_sent_counter ;
72
- bool tx_allowed ;
73
- bool send_synch_info_on_next_broadcast_channel ;
74
- bool beacon_received_on_this_bc_channel ;
72
+ bool tx_allowed : 1 ;
73
+ bool send_synch_info_on_next_broadcast_channel : 1 ;
74
+ bool beacon_received_on_this_bc_channel : 1 ;
75
75
uint16_t channel_list_counter ;
76
76
uint16_t synch_panid ;
77
77
uint32_t synch_interval ;
Original file line number Diff line number Diff line change 33
33
34
34
#define TRACE_GROUP "fhssc"
35
35
36
- fhss_structure_t * fhss_struct = 0 ;
36
+ static fhss_structure_t * fhss_struct = NULL ;
37
37
38
38
static void fhss_event_timer_cb (int8_t timer_id , uint16_t slots );
39
39
static fhss_structure_t * fhss_get_object_with_timer_id (const int8_t timer_id );
Original file line number Diff line number Diff line change 31
31
#include "fhss_callbacks_stub.h"
32
32
#include "fhss_beacon_tasklet_stub.h"
33
33
34
- extern fhss_structure_t * fhss_struct ;
34
+ static fhss_api_t fhss_test_api ;
35
+ static fhss_timer_t fhss_test_timer ;
36
+ static fhss_structure_t * fhss_struct ;
35
37
36
38
37
39
static void test_alloc_fhss_struct (void )
38
40
{
39
- fhss_struct = malloc (sizeof (fhss_structure_t ));
41
+ nsdynmemlib_stub .returnCounter += 1 ;
42
+ fhss_struct = fhss_allocate_instance (& fhss_test_api , & fhss_test_timer );
40
43
fhss_struct -> bs = malloc (sizeof (fhss_bs_t ));
41
44
}
42
45
You can’t perform that action at this time.
0 commit comments