Browse Source

Warnign fixes

pull/474/head
Luca Deri 4 years ago
parent
commit
3095c816e2
  1. 8
      src/sn.c
  2. 2
      tools/benchmark.c

8
src/sn.c

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

2
tools/benchmark.c

@ -150,7 +150,7 @@ static void run_compression_benchmark() {
gettimeofday( &t1, NULL ); gettimeofday( &t1, NULL );
while(tdiff < target_usec) { while(tdiff < target_usec) {
compression_len = N2N_PKT_BUF_SIZE; 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"); printf("\n\t compression error\n");
exit(1); exit(1);
} }

Loading…
Cancel
Save