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
6969 uint8_t beacons_received_timer ;
7070 uint8_t broadcast_start_superframe ;
7171 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 ;
7575 uint16_t channel_list_counter ;
7676 uint16_t synch_panid ;
7777 uint32_t synch_interval ;
Original file line number Diff line number Diff line change 3333
3434#define TRACE_GROUP "fhssc"
3535
36- fhss_structure_t * fhss_struct = 0 ;
36+ static fhss_structure_t * fhss_struct = NULL ;
3737
3838static void fhss_event_timer_cb (int8_t timer_id , uint16_t slots );
3939static fhss_structure_t * fhss_get_object_with_timer_id (const int8_t timer_id );
Original file line number Diff line number Diff line change 3131#include "fhss_callbacks_stub.h"
3232#include "fhss_beacon_tasklet_stub.h"
3333
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 ;
3537
3638
3739static void test_alloc_fhss_struct (void )
3840{
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 );
4043 fhss_struct -> bs = malloc (sizeof (fhss_bs_t ));
4144}
4245
You can’t perform that action at this time.
0 commit comments