Risk-Aware Code Review: Auto Approve Low-Risk Changes
LiveReview LiveReview LiveReview - Free, Risk-Aware Code Review: Auto Approve Low-Risk Changes | Product Hunt LiveReview - Free, Risk-Aware Code Review: Auto Approve Low-Risk Changes | Product Hunt GitHub Install Now

We'd appreciate a star

memoverlap - check whether two memory blocks overlap

Author

       Lars Wirzenius (lars.wirzenius@helsinki.fi)

Publib                                        C Programmer's Manual                             MEMOVERLAP(3pub)

Description

memoverlap  checks  whether  the  memory  blocks  t--(t+ts-1)  and  s--(s+ss-1) overlap.  Neither pointer
       argument may be NULL, but the sizes may be 0.  The memory blocks can be arbitrary, they do not have to be
       part of the same array.  Therefore, this function hides the unportable pointer comparison that one  would
       otherwise rely on.

Name

       memoverlap - check whether two memory blocks overlap

Return Value

memoverlap returns 0 if the blocks do not overlap, and nonzero if they do.

See Also

publib(3)

Synopsis

       #include <publib.h>
       int memoverlap(const void *t, size_t ts, const void *s, size_t ss);

See Also