Notes Jonny wrote: > On Mon, Sep 29, 2014 at 2:04 PM, Chet Ramey <chet.ra...@case.edu> wrote: > > On 9/29/14, 8:22 AM, Notes Jonny wrote: > >> Hello > >> I noticed hash_search() did not check if "string" parameter was > >> non-NULL. Please find attached a patch for this. > > > > It's the caller's responsibility to ensure that the string passed to > > hash_search is non-NULL. > > What's your rationale for that?
He defines the function interface as not allowing a NULL pointer. It has to be checked by someone, sure, but both checked by caller and checked by callee are valid approaches.