Add a missing cast to the sample code

Change-Id: Id4f258e0e45e44c1ab63bd77a6fab10013a4810c
Reviewed-on: https://code.wireshark.org/review/4160
Reviewed-by: Jörg Mayer <jmayer@loplof.de>