Where we use a fixed size char array as a buffer or as a member of a
structure, use the sizeof() operator later in the same scope when we
need to know the length of the array.

Fix calls to:

    snprintf(), pkg_snprintf()
    strlcpy()
    dn_expand()