MCPcopy Create free account
hub / github.com/RsyncProject/rsync / poptBitsIntersect

Function poptBitsIntersect

popt/popt.c:804–822  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

802}
803
804int poptBitsIntersect(poptBits *ap, const poptBits b)
805{
806 __pbm_bits *abits;
807 __pbm_bits *bbits;
808 __pbm_bits rc = 0;
809 size_t nw = (__PBM_IX(_poptBitsM-1) + 1);
810 size_t i;
811
812 if (ap == NULL || b == NULL || _poptBitsNew(ap))
813 return POPT_ERROR_NULLARG;
814 abits = __PBM_BITS(*ap);
815 bbits = __PBM_BITS(b);
816
817 for (i = 0; i < nw; i++) {
818 abits[i] &= bbits[i];
819 rc |= abits[i];
820 }
821 return (rc ? 1 : 0);
822}
823
824int poptBitsUnion(poptBits *ap, const poptBits b)
825{

Callers

nothing calls this directly

Calls 1

_poptBitsNewFunction · 0.85

Tested by

no test coverage detected