diff --git a/src/dsd_ncurses.c b/src/dsd_ncurses.c index 63ff114..7839f7f 100644 --- a/src/dsd_ncurses.c +++ b/src/dsd_ncurses.c @@ -350,7 +350,7 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state) printw ("| RAN: [%02d] ", rn); printw ("TID: [%04d] ", tgn); //printw ("| RID: [%d] \n", src); - printw ("RID: [%04d] \n| ALG: 0x[%02X] KEY 0x[%02X] ", src, state->nxdn_cipher_type, state->nxdn_key); + printw ("RID: [%04d] \n| ALG: [0x%02X] KEY [0x%02X] ", src, state->nxdn_cipher_type, state->nxdn_key); if (state->carrier == 1) { printw("%s ", state->nxdn_call_type); diff --git a/src/nxdn_lib.c b/src/nxdn_lib.c index 990a0aa..d8060a8 100644 --- a/src/nxdn_lib.c +++ b/src/nxdn_lib.c @@ -734,12 +734,10 @@ void NXDN_decode_VCALL(dsd_opts * opts, dsd_state * state, uint8_t * Message) } /* Print the "Call Type" */ - //fprintf(stderr, "%s - ", NXDN_Call_Type_To_Str(CallType)); fprintf(stderr, "\n %s - ", NXDN_Call_Type_To_Str(CallType)); //line break and 1 space - sprintf (state->nxdn_call_type, NXDN_Call_Type_To_Str(CallType)); //fix warning below + //sprintf (state->nxdn_call_type, NXDN_Call_Type_To_Str(CallType)); //fix warning below //warning: format not a string literal and no format arguments [-Wformat-security] - - //state->nxdn_call_type = NXDN_Call_Type_To_Str(CallType); + sprintf (state->nxdn_call_type, "%s", NXDN_Call_Type_To_Str(CallType)); //fix warning below /* Print the "Voice Call Option" */ NXDN_Voice_Call_Option_To_Str(VoiceCallOption, DuplexMode, TransmissionMode); diff --git a/src/p25p1_hdu.c b/src/p25p1_hdu.c index 60345a5..26ad960 100644 --- a/src/p25p1_hdu.c +++ b/src/p25p1_hdu.c @@ -468,7 +468,7 @@ processHDU(dsd_opts* opts, dsd_state* state) } //if (state->errs == 0 && algidhex != 0x80) - if (opts->payload == 1 && state->errs == 0) + if (opts->payload == 1) { //fprintf (stderr, " HDU ALG ID: 0x%X KEY ID: 0x%X MI: %s \n", algidhex, kidhex, mi); fprintf (stderr, " HDU ALG ID: 0x%X KEY ID: 0x%X MI: 0x%08llX%08llX%02llX\n", algidhex, kidhex, mihex1, mihex2, mihex3); diff --git a/src/p25p1_ldu2.c b/src/p25p1_ldu2.c index b9013ec..72aae00 100644 --- a/src/p25p1_ldu2.c +++ b/src/p25p1_ldu2.c @@ -376,7 +376,7 @@ processLDU2 (dsd_opts * opts, dsd_state * state) } //if (state->errs == 0 && algidhex != 0x80) - if (opts->payload == 1 && state->errs == 0) + if (opts->payload == 1) { //fprintf (stderr, " LDU2 ALG ID: 0x%X KEY ID: 0x%X MI: %s \n", algidhex, kidhex, mi); fprintf (stderr, " LDU2 ALG ID: 0x%X KEY ID: 0x%X MI: 0x%08llX%08llX%02llX\n", algidhex, kidhex, mihex1, mihex2, mihex3);