Branch Coverage

deps/libgit2/deps/pcre/pcreposix.c
Criterion Covered Total %
branch 0 70 0.0


line true false branch
206 0 0 "unknown error code" : pstring[errcode];
210 0 0 addlength = (preg != NULL && (int)preg->re_erroffset != -1)?
211 0 0 strlen(addmessage) + 6 : 0;
213 0 0 if (errbuf_size > 0)
215 0 0 if (addlength > 0 && errbuf_size >= length + addlength)
0 0 if (addlength > 0 && errbuf_size >= length + addlength)
266 0 0 if ((cflags & PCRE_REG_ICASE) != 0) options |= PCRE_CASELESS;
267 0 0 if ((cflags & PCRE_REG_NEWLINE) != 0) options |= PCRE_MULTILINE;
268 0 0 if ((cflags & PCRE_REG_DOTALL) != 0) options |= PCRE_DOTALL;
269 0 0 if ((cflags & PCRE_REG_NOSUB) != 0) options |= PCRE_NO_AUTO_CAPTURE;
270 0 0 if ((cflags & PCRE_REG_UTF8) != 0) options |= PCRE_UTF8;
271 0 0 if ((cflags & PCRE_REG_UCP) != 0) options |= PCRE_UCP;
272 0 0 if ((cflags & PCRE_REG_UNGREEDY) != 0) options |= PCRE_UNGREEDY;
281 0 0 if (preg->re_pcre == NULL)
284 0 0 eint[errorcode] : PCRE_REG_BADPAT;
324 0 0 if ((eflags & PCRE_REG_NOTBOL) != 0) options |= PCRE_NOTBOL;
325 0 0 if ((eflags & PCRE_REG_NOTEOL) != 0) options |= PCRE_NOTEOL;
326 0 0 if ((eflags & PCRE_REG_NOTEMPTY) != 0) options |= PCRE_NOTEMPTY;
332 0 0 if (nosub || pmatch == NULL) nmatch = 0;
0 0 if (nosub || pmatch == NULL) nmatch = 0;
334 0 0 else if (nmatch > 0)
336 0 0 if (nmatch <= POSIX_MALLOC_THRESHOLD)
342 0 0 if (nmatch > INT_MAX/(sizeof(int) * 3)) return PCRE_REG_ESPACE;
344 0 0 if (ovector == NULL) return PCRE_REG_ESPACE;
354 0 0 if ((eflags & PCRE_REG_STARTEND) != 0)
356 0 0 if (pmatch == NULL) return PCRE_REG_INVARG;
369 0 0 if (rc == 0) rc = (int)nmatch; /* All captured slots were filled in */
373 0 0 if (rc >= 0)
376 0 0 if (!nosub)
378 0 0 for (i = 0; i < (size_t)rc; i++)
380 0 0 pmatch[i].rm_so = (ovector[i*2] < 0)? -1 : ovector[i*2] + so;
381 0 0 pmatch[i].rm_eo = (ovector[i*2+1] < 0)? -1: ovector[i*2+1] + so;
383 0 0 if (allocated_ovector) free(ovector);
384 0 0 for (; i < nmatch; i++) pmatch[i].rm_so = pmatch[i].rm_eo = -1;
391 0 0 if (allocated_ovector) free(ovector);