astraceroute: use switch instead of lookup table for short proto idcoverity_scan
commitfe87d2b6117de1e32769b388fe1704440e339d27
authorTobias Klauser <tklauser@distanz.ch>
Fri, 20 Oct 2017 13:19:53 +0000 (20 15:19 +0200)
committerTobias Klauser <tklauser@distanz.ch>
Fri, 20 Oct 2017 13:19:53 +0000 (20 15:19 +0200)
tree3f4ad769a64ea1689c677d47ae3c7e29f077ffeb
parent9addb47bec772b53a66c39efdd404290300d0e86
astraceroute: use switch instead of lookup table for short proto id

Avoid having a 58 entry array on stack of which only 3 are ever used.
Just look up the short protocol identifier via a good'ol switch.

Fixes Coverity CID 1381806
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
astraceroute.c