Warnign fixes

This commit is contained in:
Luca Deri 2020-10-20 17:17:17 +02:00
parent bbabf30bc5
commit 3095c816e2
2 changed files with 3 additions and 7 deletions

View File

@ -329,12 +329,8 @@ static int setOption(int optkey, char *_optarg, n2n_sn_t *sss) {
#endif
case 'F': { /* federation name */
if(sss->federation->community != NULL){
snprintf(sss->federation->community,N2N_COMMUNITY_SIZE-1,"*%s",_optarg);
sss->federation->community[N2N_COMMUNITY_SIZE-1] = '\0';
}
snprintf(sss->federation->community, N2N_COMMUNITY_SIZE-1, "*%s" ,_optarg);
sss->federation->community[N2N_COMMUNITY_SIZE-1] = '\0';
break;
}

View File

@ -150,7 +150,7 @@ static void run_compression_benchmark() {
gettimeofday( &t1, NULL );
while(tdiff < target_usec) {
compression_len = N2N_PKT_BUF_SIZE;
if(!lzo1x_1_compress(PKT_CONTENT, sizeof(PKT_CONTENT), compression_buffer, &compression_len, wrkmem) == LZO_E_OK) {
if(lzo1x_1_compress(PKT_CONTENT, sizeof(PKT_CONTENT), compression_buffer, &compression_len, wrkmem) != LZO_E_OK) {
printf("\n\t compression error\n");
exit(1);
}