@@ -113,7 +113,7 @@ int32_t crypto_standalone_get_command(const char *str)
113
113
114
114
int32_t crypto_standalone_process_command (int32_t cc , int32_t num_tokens , char * tokens )
115
115
{
116
- int32_t status = CRYPTO_LIB_SUCCESS ;
116
+ int32_t status = 0 ;
117
117
118
118
/* Process command */
119
119
switch (cc )
@@ -222,8 +222,8 @@ int32_t crypto_standalone_process_command(int32_t cc, int32_t num_tokens, char *
222
222
223
223
int32_t crypto_host_to_ip (const char * hostname , char * ip )
224
224
{
225
- struct hostent * he ;
226
- struct in_addr * * addr_list ;
225
+ struct hostent * he = NULL ;
226
+ struct in_addr * * addr_list = NULL ;
227
227
228
228
if ((he = gethostbyname (hostname )) == NULL )
229
229
{
@@ -578,7 +578,7 @@ void crypto_standalone_spp_telem_or_idle(int32_t *status_p, uint8_t *tm_ptr, uin
578
578
579
579
void * crypto_standalone_tm_process (void * socks )
580
580
{
581
- int32_t status = CRYPTO_LIB_SUCCESS ;
581
+ int32_t status = 0 ;
582
582
udp_interface_t * tm_socks = (udp_interface_t * )socks ;
583
583
udp_info_t * tm_read_sock = & tm_socks -> read ;
584
584
udp_info_t * tm_write_sock = & tm_socks -> write ;
@@ -705,24 +705,23 @@ void crypto_standalone_cleanup(const int signal)
705
705
/* Signal threads to stop */
706
706
keepRunning = CRYPTO_LIB_ERROR ;
707
707
exit (signal );
708
- return ;
709
708
}
710
709
711
710
int main (int argc , char * argv [])
712
711
{
713
- int32_t status = CRYPTO_LIB_SUCCESS ;
712
+ int32_t status = 0 ;
714
713
715
714
char input_buf [CRYPTO_MAX_INPUT_BUF ];
716
715
char input_tokens [CRYPTO_MAX_INPUT_TOKENS ][CRYPTO_MAX_INPUT_TOKEN_SIZE ];
717
- int num_input_tokens ;
718
- int cmd ;
719
- char * token_ptr ;
716
+ int num_input_tokens = 0 ;
717
+ int cmd = 0 ;
718
+ char * token_ptr = NULL ;
720
719
721
720
udp_interface_t tc_apply ;
722
721
udp_interface_t tm_process ;
723
722
724
- pthread_t tc_apply_thread ;
725
- pthread_t tm_process_thread ;
723
+ pthread_t tc_apply_thread = 0 ;
724
+ pthread_t tm_process_thread = 0 ;
726
725
727
726
tc_apply .read .ip_address = CRYPTOLIB_HOSTNAME ;
728
727
tc_apply .read .port = TC_APPLY_PORT ;
@@ -744,7 +743,7 @@ int main(int argc, char *argv[])
744
743
signal (SIGINT , crypto_standalone_cleanup );
745
744
746
745
/* Startup delay */
747
- sleep (10 );
746
+ sleep (CRYPTO_STANDALONE_STARTUP_DELAY );
748
747
// printf("Press enter once ground software has finished initializing...\n");
749
748
// fgets(input_buf, CRYPTO_MAX_INPUT_BUF, stdin);
750
749
0 commit comments