pcap: fix if check

Signed-off-by: Luka Perkov <luka.perkov@sartura.hr>
small fix in coding style

Signed-off-by: Luka Perkov <luka.perkov@sartura.hr>