Instead of checking if caller memset'ted the structure to zero, memset it inside the function regardless. There is no added benefit of a memset() + memcmp() to check if caller cleared the structure used for outputing data from the database.