Fix a harmless DNS glue macro bug

The definition of SAFE_GETUINT16 mistakenly uses "p" instead its ptr
parameter in three places, which happens to work because all current
invocations of the macro use "p" as the ptr argument.  Fix it to
correctly use the ptr parameter.

[ghudson@mit.edu: commit message]

ticket: 6845