call libnet_conf_get_seqnum() just once and fix compiler warnings