openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/systemd/1_242+AUTOINC+db2e367bfc-r0/git/src/basic/memory-util.h
static inline void* memmem_safe(const void* haystack, size_t haystacklen,
                                const void* needle, size_t needlelen)
{

    if (needlelen <= 0)
        return (void*)haystack;

    if (haystacklen < needlelen)
        return NULL;

    assert(haystack);
    assert(needle);

    return memmem(haystack, haystacklen, needle, needlelen);
}
/* Normal memmem() requires haystack to be nonnull, which is annoying for
 * zero-length buffers */
Normal memmem() requires haystack to be nonnull, which is annoying for
zero-length buffers
Normal memmem () requires haystack to be nonnull which is annoying for zero - length buffers
static inline void* memmem_safe(const void* haystack, size_t haystacklen,
                                const void* needle, size_t needlelen)
{
    if (needlelen <= 0)
        return (void*)haystack;
    if (haystacklen < needlelen)
        return NULL;
    assert(haystack);
    assert(needle);
    return memmem(haystack, haystacklen, needle, needlelen);
}
static inline void * memmem_safe ( const void * haystack , size_t haystacklen , const void * needle , size_t needlelen ) { if ( needlelen <= 0 ) return ( void * ) haystack ; if ( haystacklen < needlelen ) return NULL ; assert ( haystack ) ; assert ( needle ) ; return memmem ( haystack , haystacklen , needle , needlelen ) ; }
Normal memmem() requires haystack to be nonnull, which is annoying for
 zero-length buffers
Normal memmem () requires haystack to be nonnull which is annoying for zero - length buffers