Code simplification from Hadriels abandoned change.

Change-Id: If859ff904b254d3bc62d1d0dc5cf26cace11cae3
Reviewed-on: https://code.wireshark.org/review/4075
Reviewed-by: Anders Broman <a.broman58@gmail.com>