Curl_altsvc_cleanup:
  375|    753|{
  376|    753|  if(*asi) {
  ------------------
  |  Branch (376:6): [True: 0, False: 753]
  ------------------
  377|      0|    struct Curl_llist_node *e;
  378|      0|    struct Curl_llist_node *n;
  379|      0|    struct altsvcinfo *altsvc = *asi;
  380|      0|    for(e = Curl_llist_head(&altsvc->list); e; e = n) {
  ------------------
  |  Branch (380:45): [True: 0, False: 0]
  ------------------
  381|      0|      struct altsvc *as = Curl_node_elem(e);
  382|      0|      n = Curl_node_next(e);
  383|      0|      altsvc_free(as);
  ------------------
  |  |   87|      0|#define altsvc_free(x) curlx_free(x)
  |  |  ------------------
  |  |  |  | 1428|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  ------------------
  384|      0|    }
  385|      0|    curlx_free(altsvc->filename);
  ------------------
  |  | 1428|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  386|      0|    curlx_free(altsvc);
  ------------------
  |  | 1428|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  387|       |    *asi = NULL; /* clear the pointer */
  388|      0|  }
  389|    753|}
Curl_altsvc_save:
  396|    753|{
  397|    753|  CURLcode result = CURLE_OK;
  398|    753|  FILE *out;
  399|    753|  char *tempstore = NULL;
  400|       |
  401|    753|  if(!asi)
  ------------------
  |  Branch (401:6): [True: 753, False: 0]
  ------------------
  402|       |    /* no cache activated */
  403|    753|    return CURLE_OK;
  404|       |
  405|       |  /* if not new name is given, use the one we stored from the load */
  406|      0|  if(!file && asi->filename)
  ------------------
  |  Branch (406:6): [True: 0, False: 0]
  |  Branch (406:15): [True: 0, False: 0]
  ------------------
  407|      0|    file = asi->filename;
  408|       |
  409|      0|  if((asi->flags & CURLALTSVC_READONLYFILE) || !file || !file[0])
  ------------------
  |  | 1044|      0|#define CURLALTSVC_READONLYFILE (1L << 2)
  ------------------
  |  Branch (409:6): [True: 0, False: 0]
  |  Branch (409:48): [True: 0, False: 0]
  |  Branch (409:57): [True: 0, False: 0]
  ------------------
  410|       |    /* marked as read-only, no file or zero length filename */
  411|      0|    return CURLE_OK;
  412|       |
  413|      0|  result = Curl_fopen(data, file, &out, &tempstore);
  414|      0|  if(!result) {
  ------------------
  |  Branch (414:6): [True: 0, False: 0]
  ------------------
  415|      0|    struct Curl_llist_node *e;
  416|      0|    struct Curl_llist_node *n;
  417|      0|    fputs("# Your alt-svc cache. https://curl.se/docs/alt-svc.html\n"
  418|      0|          "# This file was generated by libcurl! Edit at your own risk.\n",
  419|      0|          out);
  420|      0|    for(e = Curl_llist_head(&asi->list); e; e = n) {
  ------------------
  |  Branch (420:42): [True: 0, False: 0]
  ------------------
  421|      0|      struct altsvc *as = Curl_node_elem(e);
  422|      0|      n = Curl_node_next(e);
  423|      0|      result = altsvc_out(as, out);
  424|      0|      if(result)
  ------------------
  |  Branch (424:10): [True: 0, False: 0]
  ------------------
  425|      0|        break;
  426|      0|    }
  427|      0|    curlx_fclose(out);
  ------------------
  |  |   81|      0|#define curlx_fclose(file)      curl_dbg_fclose(file, __LINE__, __FILE__)
  ------------------
  428|      0|    if(!result && tempstore && curlx_rename(tempstore, file))
  ------------------
  |  |   72|      0|#define curlx_rename            rename
  ------------------
  |  Branch (428:8): [True: 0, False: 0]
  |  Branch (428:19): [True: 0, False: 0]
  |  Branch (428:32): [True: 0, False: 0]
  ------------------
  429|      0|      result = CURLE_WRITE_ERROR;
  430|       |
  431|      0|    if(result && tempstore)
  ------------------
  |  Branch (431:8): [True: 0, False: 0]
  |  Branch (431:18): [True: 0, False: 0]
  ------------------
  432|      0|      unlink(tempstore);
  433|      0|  }
  434|      0|  curlx_free(tempstore);
  ------------------
  |  | 1428|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  435|      0|  return result;
  436|      0|}

Curl_eapi_enter:
  191|    753|{
  192|    753|  struct Curl_easy *data = curl;
  193|    753|  const struct Curl_eapi_fn_props *fn_props;
  194|    753|  CURLcode result = CURLE_OK;
  195|       |
  196|    753|  guard->depth = 0;
  197|       |
  198|       |  /* Verify that we got an easy handle we can work with. */
  199|    753|  if(!GOOD_EASY_HANDLE(data)) {
  ------------------
  |  |   34|    753|  (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  |   28|    753|#define CURLEASY_MAGIC_NUMBER 0xc0dedbadU
  |  |  ------------------
  |  |                 (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  |  997|    753|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (34:5): [True: 753, False: 0]
  |  |  |  Branch (34:12): [True: 753, False: 0]
  |  |  ------------------
  |  |   35|    753|   (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1027|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1000|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (199:6): [True: 0, False: 753]
  |  Branch (199:7): [True: 0, False: 0]
  |  Branch (199:7): [True: 0, False: 0]
  ------------------
  200|      0|    result = CURLE_BAD_FUNCTION_ARGUMENT;
  201|      0|    goto out;
  202|      0|  }
  203|       |  /* verify that is either not added to a multi handle OR has a
  204|       |   * GOOD multi handle that knows `data` for `data->mid`. */
  205|    753|  if(data->mid != UINT32_MAX) {
  ------------------
  |  Branch (205:6): [True: 0, False: 753]
  ------------------
  206|      0|    if(GOOD_MULTI_HANDLE(data->multi)) {
  ------------------
  |  |   48|      0|  (((x) && (x)->magic == CURLMULTI_MAGIC_NUMBER) ? TRUE : \
  |  |  ------------------
  |  |  |  |   41|      0|#define CURLMULTI_MAGIC_NUMBER 0x000bab1e
  |  |  ------------------
  |  |                 (((x) && (x)->magic == CURLMULTI_MAGIC_NUMBER) ? TRUE : \
  |  |  ------------------
  |  |  |  |  997|      0|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (48:3): [True: 0, False: 0]
  |  |  |  Branch (48:5): [True: 0, False: 0]
  |  |  |  Branch (48:12): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1027|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                 (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1000|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (206:8): [True: 0, False: 0]
  |  Branch (206:8): [True: 0, False: 0]
  ------------------
  207|      0|      if(!Curl_multi_knows_easy(data->multi, data)) {
  ------------------
  |  Branch (207:10): [True: 0, False: 0]
  ------------------
  208|       |        /* But multi does not know it, something is fishy, better deny call */
  209|      0|        DEBUGASSERT(0);
  ------------------
  |  | 1027|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (209:9): [Folded, False: 0]
  |  Branch (209:9): [Folded, False: 0]
  ------------------
  210|      0|        result = CURLE_BAD_FUNCTION_ARGUMENT;
  211|      0|        goto out;
  212|      0|      }
  213|      0|    }
  214|      0|    else {
  215|      0|      DEBUGASSERT(0); /* data needs to have a GOOD multi handle */
  ------------------
  |  | 1027|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (215:7): [Folded, False: 0]
  |  Branch (215:7): [Folded, False: 0]
  ------------------
  216|      0|      result = CURLE_BAD_FUNCTION_ARGUMENT;
  217|      0|      goto out;
  218|      0|    }
  219|      0|  }
  220|    753|  else if(data->multi) {
  ------------------
  |  Branch (220:11): [True: 0, False: 753]
  ------------------
  221|      0|    DEBUGASSERT(0); /* data should not have a multi handle */
  ------------------
  |  | 1027|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (221:5): [Folded, False: 0]
  |  Branch (221:5): [Folded, False: 0]
  ------------------
  222|      0|    result = CURLE_BAD_FUNCTION_ARGUMENT;
  223|      0|    goto out;
  224|      0|  }
  225|       |  /* verify that the call `fn` we're about to enter is known
  226|       |   * and check call properties to be admitting. */
  227|    753|  if(fn >= CURL_EAPI_FN_LAST) {
  ------------------
  |  Branch (227:6): [True: 0, False: 753]
  ------------------
  228|      0|    result = CURLE_BAD_FUNCTION_ARGUMENT;
  229|      0|    goto out;
  230|      0|  }
  231|    753|  fn_props = &eapi_fn_props[fn];
  232|    753|  DEBUGASSERT(fn_props->fn == fn);
  ------------------
  |  | 1027|    753|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (232:3): [True: 0, False: 753]
  |  Branch (232:3): [True: 753, False: 0]
  ------------------
  233|    753|  if(!fn_props->recurse) {
  ------------------
  |  Branch (233:6): [True: 753, False: 0]
  ------------------
  234|    753|    if(data->callstack.count) {
  ------------------
  |  Branch (234:8): [True: 0, False: 753]
  ------------------
  235|      0|#ifdef CURLVERBOSE
  236|      0|      DEBUGF(curl_mfprintf(stderr,
  ------------------
  |  | 1013|      0|#define DEBUGF(x) x
  ------------------
  237|      0|        "EAPI guard: calling %hu with call to %u ongoing\n", (uint16_t)fn,
  238|      0|        data->callstack.calls[data->callstack.count-1]));
  239|      0|#endif
  240|      0|      result = CURLE_RECURSIVE_API_CALL;
  241|      0|      goto out;
  242|      0|    }
  243|    753|    if(data->multi && data->multi->callstack.count) {
  ------------------
  |  Branch (243:8): [True: 0, False: 753]
  |  Branch (243:23): [True: 0, False: 0]
  ------------------
  244|      0|#ifdef CURLVERBOSE
  245|       |
  246|      0|      DEBUGF(curl_mfprintf(stderr,
  ------------------
  |  | 1013|      0|#define DEBUGF(x) x
  ------------------
  247|      0|        "EAPI guard: calling %hu with multi call to %u ongoing\n",
  248|      0|        (uint16_t)fn,
  249|      0|        data->multi->callstack.calls[data->multi->callstack.count-1]));
  250|      0|#endif
  251|      0|      result = CURLE_RECURSIVE_API_CALL;
  252|      0|      goto out;
  253|      0|    }
  254|    753|  }
  255|       |
  256|    753|  if(fn_props->no_event_cb && eapi_in_event_cb(data)) {
  ------------------
  |  Branch (256:6): [True: 0, False: 753]
  |  Branch (256:31): [True: 0, False: 0]
  ------------------
  257|       |    /* Not allowed to be invoked while an event cb is ongoing */
  258|      0|#ifdef CURLVERBOSE
  259|      0|      DEBUGF(curl_mfprintf(stderr,
  ------------------
  |  | 1013|      0|#define DEBUGF(x) x
  ------------------
  260|      0|        "EAPI guard: calling %hu while event callback ongoing\n",
  261|      0|        (uint16_t)fn));
  262|      0|#endif
  263|      0|    result = CURLE_RECURSIVE_API_CALL;
  264|      0|    goto out;
  265|      0|  }
  266|       |
  267|    753|#if defined(USE_SSL) && defined(USE_MUTEX)
  268|    753|  if(fn_props->no_scache_lock &&
  ------------------
  |  Branch (268:6): [True: 0, False: 753]
  ------------------
  269|      0|     Curl_ssl_scache_is_locked_by_current_thread(data)) {
  ------------------
  |  Branch (269:6): [True: 0, False: 0]
  ------------------
  270|      0|#ifdef CURLVERBOSE
  271|      0|      DEBUGF(curl_mfprintf(stderr,
  ------------------
  |  | 1013|      0|#define DEBUGF(x) x
  ------------------
  272|      0|        "EAPI guard: calling %hu while vtls_scache is locked by "
  273|      0|        "current thread\n", (uint16_t)fn));
  274|      0|#endif
  275|      0|    result = CURLE_RECURSIVE_API_CALL;
  276|      0|    goto out;
  277|      0|  }
  278|    753|#endif
  279|       |
  280|       |  /* all fine, add to data's callstack */
  281|    753|  if(data->callstack.count >= CURL_EAPI_MAX_RECURSION) {
  ------------------
  |  |  139|    753|#define CURL_EAPI_MAX_RECURSION       7
  ------------------
  |  Branch (281:6): [True: 0, False: 753]
  ------------------
  282|      0|    result = CURLE_RECURSIVE_API_CALL;
  283|      0|    goto out;
  284|      0|  }
  285|    753|  data->callstack.calls[data->callstack.count] = (uint16_t)fn;
  286|    753|  ++data->callstack.count;
  287|    753|  guard->depth = data->callstack.count;
  288|    753|  guard->data = fn_props->data_is_killed ? NULL : data;
  ------------------
  |  Branch (288:17): [True: 753, False: 0]
  ------------------
  289|       |
  290|    753|out:
  291|    753|  if(presult)
  ------------------
  |  Branch (291:6): [True: 0, False: 753]
  ------------------
  292|      0|    *presult = result;
  293|    753|  return guard->depth > 0;
  294|    753|}
Curl_eapi_leave:
  297|    753|{
  298|    753|  if(guard->depth) {
  ------------------
  |  Branch (298:6): [True: 753, False: 0]
  ------------------
  299|       |    /* guard->data is set when handle is supposed to stay alive during call */
  300|    753|    if(guard->data && GOOD_EASY_HANDLE(guard->data)) {
  ------------------
  |  |   34|      0|  (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  |   28|      0|#define CURLEASY_MAGIC_NUMBER 0xc0dedbadU
  |  |  ------------------
  |  |                 (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  |  997|      0|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (34:3): [True: 0, False: 0]
  |  |  |  Branch (34:5): [True: 0, False: 0]
  |  |  |  Branch (34:12): [True: 0, False: 0]
  |  |  ------------------
  |  |   35|      0|   (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1027|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1000|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (300:8): [True: 0, False: 753]
  |  Branch (300:23): [True: 0, False: 0]
  |  Branch (300:23): [True: 0, False: 0]
  ------------------
  301|      0|      if(guard->depth > guard->data->callstack.count) {
  ------------------
  |  Branch (301:10): [True: 0, False: 0]
  ------------------
  302|      0|        DEBUGASSERT(0); /* something very wrong */
  ------------------
  |  | 1027|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (302:9): [Folded, False: 0]
  |  Branch (302:9): [Folded, False: 0]
  ------------------
  303|      0|      }
  304|      0|      else {
  305|      0|        if(guard->depth < guard->data->callstack.count) {
  ------------------
  |  Branch (305:12): [True: 0, False: 0]
  ------------------
  306|      0|          DEBUGASSERT(0); /* someone forgot to clean up */
  ------------------
  |  | 1027|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (306:11): [Folded, False: 0]
  |  Branch (306:11): [Folded, False: 0]
  ------------------
  307|      0|        }
  308|       |        /* reset to depth the guard was entered in */
  309|      0|        guard->data->callstack.count = (uint16_t)(guard->depth - 1);
  310|      0|      }
  311|      0|    }
  312|    753|  }
  313|    753|}

Curl_bufref_init:
   38|  1.50k|{
   39|  1.50k|  DEBUGASSERT(br);
  ------------------
  |  | 1027|  1.50k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (39:3): [True: 0, False: 1.50k]
  |  Branch (39:3): [True: 1.50k, False: 0]
  ------------------
   40|  1.50k|  br->dtor = NULL;
   41|  1.50k|  br->ptr = NULL;
   42|  1.50k|  br->len = 0;
   43|       |
   44|  1.50k|#ifdef DEBUGBUILD
   45|  1.50k|  br->signature = SIGNATURE;
  ------------------
  |  |   31|  1.50k|#define SIGNATURE 0x5c48e9b2    /* Random pattern. */
  ------------------
   46|  1.50k|#endif
   47|  1.50k|}
Curl_bufref_free:
   55|  2.25k|{
   56|  2.25k|  DEBUGASSERT(br);
  ------------------
  |  | 1027|  2.25k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (56:3): [True: 0, False: 2.25k]
  |  Branch (56:3): [True: 2.25k, False: 0]
  ------------------
   57|  2.25k|  DEBUGASSERT(br->signature == SIGNATURE);
  ------------------
  |  | 1027|  2.25k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (57:3): [True: 0, False: 2.25k]
  |  Branch (57:3): [True: 2.25k, False: 0]
  ------------------
   58|  2.25k|  DEBUGASSERT(br->ptr || !br->len);
  ------------------
  |  | 1027|  2.25k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (58:3): [True: 2.25k, False: 0]
  |  Branch (58:3): [True: 0, False: 0]
  |  Branch (58:3): [True: 0, False: 2.25k]
  |  Branch (58:3): [True: 2.25k, False: 0]
  ------------------
   59|       |
   60|  2.25k|  if(br->ptr && br->dtor)
  ------------------
  |  Branch (60:6): [True: 0, False: 2.25k]
  |  Branch (60:17): [True: 0, False: 0]
  ------------------
   61|      0|    br->dtor(CURL_UNCONST(br->ptr));
  ------------------
  |  |  808|      0|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
   62|       |
   63|  2.25k|  br->dtor = NULL;
   64|       |  br->ptr = NULL;
   65|  2.25k|  br->len = 0;
   66|  2.25k|}

Curl_flush_cookies:
 1673|    753|{
 1674|    753|  Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE);
 1675|       |  /* only save the cookie file if a transfer was started (cookies->running is
 1676|       |     set), as otherwise the cookies were not completely initialized and there
 1677|       |     might be cookie files that were not loaded so saving the file is the
 1678|       |     wrong thing. */
 1679|    753|  if(data->cookies) {
  ------------------
  |  Branch (1679:6): [True: 0, False: 753]
  ------------------
 1680|      0|    const char *cookiejar = CURL_EASY_STR(data, STRING_COOKIEJAR);
  ------------------
  |  | 1234|      0|  Curl_u8_strset_get(&(d)->set.strings, (uint8_t)(id))
  ------------------
 1681|      0|    if(cookiejar && data->cookies->running) {
  ------------------
  |  Branch (1681:8): [True: 0, False: 0]
  |  Branch (1681:21): [True: 0, False: 0]
  ------------------
 1682|       |      /* if we have a destination file for all the cookies to get dumped to */
 1683|      0|      CURLcode result = cookie_output(data, data->cookies, cookiejar);
 1684|      0|      if(result)
  ------------------
  |  Branch (1684:10): [True: 0, False: 0]
  ------------------
 1685|      0|        infof(data, "WARNING: failed to save cookies in %s: %s",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1686|      0|              cookiejar, curl_easy_strerror(result));
 1687|      0|    }
 1688|       |
 1689|      0|    if(cleanup && (!data->share || (data->cookies != data->share->cookies))) {
  ------------------
  |  Branch (1689:8): [True: 0, False: 0]
  |  Branch (1689:20): [True: 0, False: 0]
  |  Branch (1689:36): [True: 0, False: 0]
  ------------------
 1690|      0|      Curl_cookie_cleanup(data->cookies);
 1691|       |      data->cookies = NULL;
 1692|      0|    }
 1693|      0|  }
 1694|    753|  Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE);
 1695|    753|}

Curl_creds_create:
   41|     97|{
   42|     97|  struct Curl_creds *creds = NULL;
   43|     97|  size_t ulen = user ? strlen(user) : 0;
  ------------------
  |  Branch (43:17): [True: 76, False: 21]
  ------------------
   44|     97|  size_t plen = passwd ? strlen(passwd) : 0;
  ------------------
  |  Branch (44:17): [True: 54, False: 43]
  ------------------
   45|     97|  size_t olen = oauth_bearer ? strlen(oauth_bearer) : 0;
  ------------------
  |  Branch (45:17): [True: 0, False: 97]
  ------------------
   46|     97|  size_t salen = sasl_authzid ? strlen(sasl_authzid) : 0;
  ------------------
  |  Branch (46:18): [True: 0, False: 97]
  ------------------
   47|     97|  size_t sslen = sasl_service ? strlen(sasl_service) : 0;
  ------------------
  |  Branch (47:18): [True: 0, False: 97]
  ------------------
   48|     97|  char *s, *buf;
   49|     97|  size_t bufsize;
   50|     97|  CURLcode result = CURLE_OK;
   51|       |
   52|     97|  Curl_creds_unlink(pcreds);
   53|       |
   54|       |  /* Everything empty/NULL, this is the NULL credential */
   55|     97|  if(!user && !passwd && !olen && !salen && !sslen)
  ------------------
  |  Branch (55:6): [True: 21, False: 76]
  |  Branch (55:15): [True: 0, False: 21]
  |  Branch (55:26): [True: 0, False: 0]
  |  Branch (55:35): [True: 0, False: 0]
  |  Branch (55:45): [True: 0, False: 0]
  ------------------
   56|      0|    goto out;
   57|       |
   58|     97|  if((ulen > CURL_MAX_INPUT_LENGTH) ||
  ------------------
  |  |   45|     97|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
  |  Branch (58:6): [True: 0, False: 97]
  ------------------
   59|     97|     (plen > CURL_MAX_INPUT_LENGTH) ||
  ------------------
  |  |   45|     97|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
  |  Branch (59:6): [True: 0, False: 97]
  ------------------
   60|     97|     (olen > CURL_MAX_INPUT_LENGTH) ||
  ------------------
  |  |   45|     97|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
  |  Branch (60:6): [True: 0, False: 97]
  ------------------
   61|     97|     (salen > CURL_MAX_INPUT_LENGTH) ||
  ------------------
  |  |   45|     97|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
  |  Branch (61:6): [True: 0, False: 97]
  ------------------
   62|     97|     (sslen > CURL_MAX_INPUT_LENGTH)) {
  ------------------
  |  |   45|     97|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
  |  Branch (62:6): [True: 0, False: 97]
  ------------------
   63|      0|    result = CURLE_BAD_FUNCTION_ARGUMENT;
   64|      0|    goto out;
   65|      0|  }
   66|       |
   67|       |  /* null-terminator for user already part of struct */
   68|     97|  bufsize = ulen + plen + 1 + olen + 1 + salen + 1 + sslen + 1;
   69|     97|  creds = curlx_calloc(1, sizeof(*creds) + bufsize);
  ------------------
  |  | 1425|     97|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
   70|     97|  if(!creds) {
  ------------------
  |  Branch (70:6): [True: 0, False: 97]
  ------------------
   71|      0|    result = CURLE_OUT_OF_MEMORY;
   72|      0|    goto out;
   73|      0|  }
   74|       |
   75|     97|  creds->bufsize = bufsize;
   76|     97|  creds->refcount = 1;
   77|     97|  creds->source = source;
   78|       |  /* Some compilers try to be too smart about our dynamic struct size */
   79|     97|  buf = ((char *)creds) + offsetof(struct Curl_creds, buf);
   80|     97|  creds->user = s = buf;
   81|     97|  if(ulen)
  ------------------
  |  Branch (81:6): [True: 72, False: 25]
  ------------------
   82|     72|    memcpy(s, user, ulen + 1);
   83|     97|  creds->passwd = s = buf + ulen + 1;
   84|     97|  if(plen)
  ------------------
  |  Branch (84:6): [True: 54, False: 43]
  ------------------
   85|     54|    memcpy(s, passwd, plen + 1);
   86|     97|  creds->oauth_bearer = s = buf + ulen + 1 + plen + 1;
   87|     97|  if(olen)
  ------------------
  |  Branch (87:6): [True: 0, False: 97]
  ------------------
   88|      0|    memcpy(s, oauth_bearer, olen + 1);
   89|     97|  creds->sasl_authzid = s = buf + ulen + 1 + plen + 1 + olen + 1;
   90|     97|  if(salen)
  ------------------
  |  Branch (90:6): [True: 0, False: 97]
  ------------------
   91|      0|    memcpy(s, sasl_authzid, salen + 1);
   92|     97|  creds->sasl_service = s = buf + ulen + 1 + plen + 1 + olen + 1 + salen + 1;
   93|     97|  if(sslen)
  ------------------
  |  Branch (93:6): [True: 0, False: 97]
  ------------------
   94|      0|    memcpy(s, sasl_service, sslen + 1);
   95|       |
   96|     97|out:
   97|     97|  if(!result)
  ------------------
  |  Branch (97:6): [True: 97, False: 0]
  ------------------
   98|     97|    *pcreds = creds;
   99|      0|  else
  100|      0|    Curl_creds_unlink(&creds);
  101|     97|  return result;
  102|     97|}
Curl_creds_link:
  131|     97|{
  132|     97|  if(*pdest != src) {
  ------------------
  |  Branch (132:6): [True: 97, False: 0]
  ------------------
  133|     97|    Curl_creds_unlink(pdest);
  134|     97|    *pdest = src;
  135|     97|    if(src) {
  ------------------
  |  Branch (135:8): [True: 97, False: 0]
  ------------------
  136|     97|      DEBUGASSERT(src->refcount < UINT32_MAX);
  ------------------
  |  | 1027|     97|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (136:7): [True: 0, False: 97]
  |  Branch (136:7): [True: 97, False: 0]
  ------------------
  137|     97|      src->refcount++;
  138|     97|    }
  139|     97|  }
  140|     97|}
Curl_creds_unlink:
  143|  6.10k|{
  144|  6.10k|  if(*pcreds) {
  ------------------
  |  Branch (144:6): [True: 194, False: 5.91k]
  ------------------
  145|    194|    struct Curl_creds *creds = *pcreds;
  146|       |
  147|    194|    DEBUGASSERT(creds->refcount);
  ------------------
  |  | 1027|    194|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (147:5): [True: 0, False: 194]
  |  Branch (147:5): [True: 194, False: 0]
  ------------------
  148|    194|    *pcreds = NULL;
  149|    194|    if(creds->refcount)
  ------------------
  |  Branch (149:8): [True: 194, False: 0]
  ------------------
  150|    194|      creds->refcount--;
  151|    194|    if(!creds->refcount) {
  ------------------
  |  Branch (151:8): [True: 97, False: 97]
  ------------------
  152|     97|      curlx_memzero(creds, sizeof(*creds) + creds->bufsize);
  153|     97|      curlx_free(creds);
  ------------------
  |  | 1428|     97|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  154|     97|    }
  155|    194|  }
  156|  6.10k|}

Curl_get_line:
   36|  79.8k|{
   37|  79.8k|  CURLcode result;
   38|  79.8k|  char buffer[128];
   39|  79.8k|  curlx_dyn_reset(buf);
   40|  95.6k|  while(1) {
  ------------------
  |  Branch (40:9): [True: 95.6k, Folded]
  ------------------
   41|  95.6k|    size_t rlen;
   42|  95.6k|    const char *b = fgets(buffer, sizeof(buffer), input);
   43|  95.6k|    if(!b && ferror(input))
  ------------------
  |  Branch (43:8): [True: 133, False: 95.5k]
  |  Branch (43:14): [True: 0, False: 133]
  ------------------
   44|      0|      return CURLE_READ_ERROR;
   45|       |
   46|  95.6k|    *eof = feof(input);
   47|       |
   48|  95.6k|    rlen = b ? strlen(b) : 0;
  ------------------
  |  Branch (48:12): [True: 95.5k, False: 133]
  ------------------
   49|  95.6k|    if(rlen) {
  ------------------
  |  Branch (49:8): [True: 94.6k, False: 1.01k]
  ------------------
   50|  94.6k|      result = curlx_dyn_addn(buf, b, rlen);
   51|  94.6k|      if(result)
  ------------------
  |  Branch (51:10): [True: 7, False: 94.6k]
  ------------------
   52|       |        /* too long line or out of memory */
   53|      7|        return result;
   54|  94.6k|    }
   55|       |    /* now check the full line */
   56|  95.6k|    rlen = curlx_dyn_len(buf);
   57|  95.6k|    b = curlx_dyn_ptr(buf);
   58|  95.6k|    if(rlen && (b[rlen - 1] == '\n'))
  ------------------
  |  Branch (58:8): [True: 94.8k, False: 779]
  |  Branch (58:16): [True: 79.0k, False: 15.7k]
  ------------------
   59|       |      /* LF at end of the line */
   60|  79.0k|      return CURLE_OK; /* all good */
   61|  16.5k|    if(*eof)
  ------------------
  |  Branch (61:8): [True: 746, False: 15.7k]
  ------------------
   62|       |      /* append a newline */
   63|    746|      return curlx_dyn_addn(buf, "\n", 1);
   64|       |    /* otherwise get next line to append */
   65|  16.5k|  }
   66|       |  /* UNREACHABLE */
   67|  79.8k|}

Curl_share_lock_share:
  378|    753|{
  379|    753|  if(!share)
  ------------------
  |  Branch (379:6): [True: 753, False: 0]
  ------------------
  380|    753|    return CURLSHE_INVALID;
  381|       |
  382|      0|  if(share->specifier & (unsigned int)(1 << type) &&
  ------------------
  |  Branch (382:6): [True: 0, False: 0]
  ------------------
  383|      0|     share->lockfunc) /* only call this if set! */
  ------------------
  |  Branch (383:6): [True: 0, False: 0]
  ------------------
  384|      0|    share->lockfunc(data, type, accesstype, share->clientdata);
  385|       |  /* else if we do not share this, pretend successful lock */
  386|       |
  387|      0|  return CURLSHE_OK;
  388|    753|}
Curl_share_lock:
  392|    753|{
  393|    753|  return Curl_share_lock_share(data->share, data, type, accesstype);
  394|    753|}
Curl_share_unlock_share:
  399|    753|{
  400|    753|  if(!share)
  ------------------
  |  Branch (400:6): [True: 753, False: 0]
  ------------------
  401|    753|    return CURLSHE_INVALID;
  402|       |
  403|      0|  if(share->specifier & (unsigned int)(1 << type) &&
  ------------------
  |  Branch (403:6): [True: 0, False: 0]
  ------------------
  404|      0|     share->unlockfunc) /* only call this if set! */
  ------------------
  |  Branch (404:6): [True: 0, False: 0]
  ------------------
  405|      0|    share->unlockfunc(data, type, share->clientdata);
  406|       |
  407|      0|  return CURLSHE_OK;
  408|    753|}
Curl_share_unlock:
  411|    753|{
  412|    753|  return Curl_share_unlock_share(data->share, data, type);
  413|    753|}
Curl_share_easy_unlink:
  416|    753|{
  417|    753|  struct Curl_share *share = data->share;
  418|       |
  419|    753|  if(share) {
  ------------------
  |  Branch (419:6): [True: 0, False: 753]
  ------------------
  420|      0|    bool locked = share_lock_acquire(share, data);
  421|       |
  422|       |    /* If share caches connections, detach any existing connection and
  423|       |     * forget its identifier. */
  424|      0|    if((share->specifier & (1 << CURL_LOCK_DATA_CONNECT))) {
  ------------------
  |  Branch (424:8): [True: 0, False: 0]
  ------------------
  425|      0|      if(data->conn)
  ------------------
  |  Branch (425:10): [True: 0, False: 0]
  ------------------
  426|      0|        Curl_detach_connection(data);
  427|      0|      data->state.lastconnect_id = -1;
  428|      0|    }
  429|       |
  430|      0|#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_COOKIES)
  431|      0|    if(share->cookies == data->cookies)
  ------------------
  |  Branch (431:8): [True: 0, False: 0]
  ------------------
  432|      0|      data->cookies = NULL;
  433|      0|#endif
  434|       |
  435|      0|#ifndef CURL_DISABLE_HSTS
  436|      0|    if(share->hsts == data->hsts)
  ------------------
  |  Branch (436:8): [True: 0, False: 0]
  ------------------
  437|      0|      data->hsts = NULL;
  438|      0|#endif
  439|       |#ifdef USE_LIBPSL
  440|       |    if(&share->psl == data->psl)
  441|       |      data->psl = data->multi ? &data->multi->psl : NULL;
  442|       |#endif
  443|       |
  444|      0|    share_unlink(&data->share, data, locked);
  445|      0|  }
  446|    753|  return CURLE_OK;
  447|    753|}

Curl_trc_opt:
  670|      2|{
  671|      2|  CURLcode result = config ? trc_opt(config) : CURLE_OK;
  ------------------
  |  Branch (671:21): [True: 0, False: 2]
  ------------------
  672|      2|#ifdef DEBUGBUILD
  673|       |  /* CURL_DEBUG can override anything */
  674|      2|  if(!result) {
  ------------------
  |  Branch (674:6): [True: 2, False: 0]
  ------------------
  675|      2|    const char *dbg_config = getenv("CURL_DEBUG");
  676|      2|    if(dbg_config)
  ------------------
  |  Branch (676:8): [True: 0, False: 2]
  ------------------
  677|      0|      result = trc_opt(dbg_config);
  678|      2|  }
  679|      2|#endif /* DEBUGBUILD */
  680|      2|  return result;
  681|      2|}
Curl_trc_init:
  684|      2|{
  685|      2|#ifdef DEBUGBUILD
  686|      2|  return Curl_trc_opt(NULL);
  687|       |#else
  688|       |  return CURLE_OK;
  689|       |#endif
  690|      2|}

curlx_dyn_init:
   39|  3.75k|{
   40|  3.75k|  DEBUGASSERT(s);
  ------------------
  |  | 1027|  3.75k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (40:3): [True: 0, False: 3.75k]
  |  Branch (40:3): [True: 3.75k, False: 0]
  ------------------
   41|  3.75k|  DEBUGASSERT(toobig);
  ------------------
  |  | 1027|  3.75k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (41:3): [True: 0, False: 3.75k]
  |  Branch (41:3): [True: 3.75k, False: 0]
  ------------------
   42|  3.75k|  DEBUGASSERT(toobig <= MAX_DYNBUF_SIZE); /* catch crazy mistakes */
  ------------------
  |  | 1027|  3.75k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (42:3): [True: 0, False: 3.75k]
  |  Branch (42:3): [True: 3.75k, False: 0]
  ------------------
   43|  3.75k|  s->bufr = NULL;
   44|  3.75k|  s->leng = 0;
   45|  3.75k|  s->allc = 0;
   46|  3.75k|  s->toobig = toobig;
   47|  3.75k|#ifdef DEBUGBUILD
   48|  3.75k|  s->init = DYNINIT;
  ------------------
  |  |   32|  3.75k|#define DYNINIT 0xbee51da /* random pattern */
  ------------------
   49|  3.75k|#endif
   50|  3.75k|}
curlx_dyn_free:
   57|  3.79k|{
   58|  3.79k|  DEBUGASSERT(s);
  ------------------
  |  | 1027|  3.79k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (58:3): [True: 0, False: 3.79k]
  |  Branch (58:3): [True: 3.79k, False: 0]
  ------------------
   59|  3.79k|  DEBUGASSERT(s->init == DYNINIT);
  ------------------
  |  | 1027|  3.79k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (59:3): [True: 0, False: 3.79k]
  |  Branch (59:3): [True: 3.79k, False: 0]
  ------------------
   60|  3.79k|  curlx_safefree(s->bufr);
  ------------------
  |  | 1284|  3.79k|  do {                      \
  |  | 1285|  3.79k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1428|  3.79k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1286|  3.79k|    (ptr) = NULL;           \
  |  | 1287|  3.79k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1287:11): [Folded, False: 3.79k]
  |  |  ------------------
  ------------------
   61|  3.79k|  s->leng = s->allc = 0;
   62|  3.79k|}
curlx_dyn_reset:
  126|   153k|{
  127|   153k|  DEBUGASSERT(s);
  ------------------
  |  | 1027|   153k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (127:3): [True: 0, False: 153k]
  |  Branch (127:3): [True: 153k, False: 0]
  ------------------
  128|   153k|  DEBUGASSERT(s->init == DYNINIT);
  ------------------
  |  | 1027|   153k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (128:3): [True: 0, False: 153k]
  |  Branch (128:3): [True: 153k, False: 0]
  ------------------
  129|   153k|  DEBUGASSERT(!s->leng || s->bufr);
  ------------------
  |  | 1027|   153k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (129:3): [True: 153k, False: 0]
  |  Branch (129:3): [True: 0, False: 0]
  |  Branch (129:3): [True: 59.7k, False: 93.6k]
  |  Branch (129:3): [True: 93.6k, False: 0]
  ------------------
  130|   153k|  if(s->leng)
  ------------------
  |  Branch (130:6): [True: 93.6k, False: 59.7k]
  ------------------
  131|  93.6k|    s->bufr[0] = 0;
  132|   153k|  s->leng = 0;
  133|   153k|}
curlx_dyn_addn:
  163|   222k|{
  164|   222k|  DEBUGASSERT(s);
  ------------------
  |  | 1027|   222k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (164:3): [True: 0, False: 222k]
  |  Branch (164:3): [True: 222k, False: 0]
  ------------------
  165|   222k|  DEBUGASSERT(s->init == DYNINIT);
  ------------------
  |  | 1027|   222k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (165:3): [True: 0, False: 222k]
  |  Branch (165:3): [True: 222k, False: 0]
  ------------------
  166|   222k|  DEBUGASSERT(!s->leng || s->bufr);
  ------------------
  |  | 1027|   222k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (166:3): [True: 222k, False: 0]
  |  Branch (166:3): [True: 0, False: 0]
  |  Branch (166:3): [True: 103k, False: 118k]
  |  Branch (166:3): [True: 118k, False: 0]
  ------------------
  167|   222k|  return dyn_nappend(s, mem, len);
  168|   222k|}
curlx_dyn_add:
  174|  79.6k|{
  175|  79.6k|  size_t n;
  176|  79.6k|  DEBUGASSERT(str);
  ------------------
  |  | 1027|  79.6k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (176:3): [True: 0, False: 79.6k]
  |  Branch (176:3): [True: 79.6k, False: 0]
  ------------------
  177|  79.6k|  DEBUGASSERT(s);
  ------------------
  |  | 1027|  79.6k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (177:3): [True: 0, False: 79.6k]
  |  Branch (177:3): [True: 79.6k, False: 0]
  ------------------
  178|  79.6k|  DEBUGASSERT(s->init == DYNINIT);
  ------------------
  |  | 1027|  79.6k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (178:3): [True: 0, False: 79.6k]
  |  Branch (178:3): [True: 79.6k, False: 0]
  ------------------
  179|  79.6k|  DEBUGASSERT(!s->leng || s->bufr);
  ------------------
  |  | 1027|  79.6k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (179:3): [True: 79.6k, False: 0]
  |  Branch (179:3): [True: 0, False: 0]
  |  Branch (179:3): [True: 753, False: 78.8k]
  |  Branch (179:3): [True: 78.8k, False: 0]
  ------------------
  180|  79.6k|  n = strlen(str);
  181|  79.6k|  return dyn_nappend(s, (const unsigned char *)str, n);
  182|  79.6k|}
curlx_dyn_ptr:
  238|   192k|{
  239|   192k|  DEBUGASSERT(s);
  ------------------
  |  | 1027|   192k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (239:3): [True: 0, False: 192k]
  |  Branch (239:3): [True: 192k, False: 0]
  ------------------
  240|   192k|  DEBUGASSERT(s->init == DYNINIT);
  ------------------
  |  | 1027|   192k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (240:3): [True: 0, False: 192k]
  |  Branch (240:3): [True: 192k, False: 0]
  ------------------
  241|   192k|  DEBUGASSERT(!s->leng || s->bufr);
  ------------------
  |  | 1027|   192k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (241:3): [True: 192k, False: 0]
  |  Branch (241:3): [True: 0, False: 0]
  |  Branch (241:3): [True: 7.33k, False: 184k]
  |  Branch (241:3): [True: 184k, False: 0]
  ------------------
  242|   192k|  return s->bufr;
  243|   192k|}
curlx_dyn_len:
  272|  96.3k|{
  273|  96.3k|  DEBUGASSERT(s);
  ------------------
  |  | 1027|  96.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (273:3): [True: 0, False: 96.3k]
  |  Branch (273:3): [True: 96.3k, False: 0]
  ------------------
  274|  96.3k|  DEBUGASSERT(s->init == DYNINIT);
  ------------------
  |  | 1027|  96.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (274:3): [True: 0, False: 96.3k]
  |  Branch (274:3): [True: 96.3k, False: 0]
  ------------------
  275|  96.3k|  DEBUGASSERT(!s->leng || s->bufr);
  ------------------
  |  | 1027|  96.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (275:3): [True: 96.3k, False: 0]
  |  Branch (275:3): [True: 0, False: 0]
  |  Branch (275:3): [True: 779, False: 95.5k]
  |  Branch (275:3): [True: 95.5k, False: 0]
  ------------------
  276|  96.3k|  return s->leng;
  277|  96.3k|}
dynbuf.c:dyn_nappend:
   69|   301k|{
   70|   301k|  size_t idx = s->leng;
   71|   301k|  size_t a = s->allc;
   72|   301k|  size_t fit = len + idx + 1; /* new string + old string + zero byte */
   73|       |
   74|       |  /* try to detect if there is rubbish in the struct */
   75|   301k|  DEBUGASSERT(s->init == DYNINIT);
  ------------------
  |  | 1027|   301k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (75:3): [True: 0, False: 301k]
  |  Branch (75:3): [True: 301k, False: 0]
  ------------------
   76|   301k|  DEBUGASSERT(s->toobig);
  ------------------
  |  | 1027|   301k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (76:3): [True: 0, False: 301k]
  |  Branch (76:3): [True: 301k, False: 0]
  ------------------
   77|   301k|  DEBUGASSERT(idx < s->toobig);
  ------------------
  |  | 1027|   301k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (77:3): [True: 0, False: 301k]
  |  Branch (77:3): [True: 301k, False: 0]
  ------------------
   78|   301k|  DEBUGASSERT(!s->leng || s->bufr);
  ------------------
  |  | 1027|   301k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (78:3): [True: 301k, False: 0]
  |  Branch (78:3): [True: 0, False: 0]
  |  Branch (78:3): [True: 103k, False: 197k]
  |  Branch (78:3): [True: 197k, False: 0]
  ------------------
   79|   301k|  DEBUGASSERT(a <= s->toobig);
  ------------------
  |  | 1027|   301k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (79:3): [True: 0, False: 301k]
  |  Branch (79:3): [True: 301k, False: 0]
  ------------------
   80|   301k|  DEBUGASSERT(!len || mem);
  ------------------
  |  | 1027|   301k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (80:3): [True: 301k, False: 0]
  |  Branch (80:3): [True: 0, False: 0]
  |  Branch (80:3): [True: 9.52k, False: 292k]
  |  Branch (80:3): [True: 292k, False: 0]
  ------------------
   81|       |
   82|   301k|  if(fit > s->toobig) {
  ------------------
  |  Branch (82:6): [True: 26, False: 301k]
  ------------------
   83|     26|    curlx_dyn_free(s);
   84|     26|    return CURLE_TOO_LARGE;
   85|     26|  }
   86|   301k|  else if(!a) {
  ------------------
  |  Branch (86:11): [True: 1.94k, False: 299k]
  ------------------
   87|  1.94k|    DEBUGASSERT(!idx);
  ------------------
  |  | 1027|  1.94k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (87:5): [True: 0, False: 1.94k]
  |  Branch (87:5): [True: 1.94k, False: 0]
  ------------------
   88|       |    /* first invoke */
   89|  1.94k|    if(MIN_FIRST_ALLOC > s->toobig)
  ------------------
  |  |   29|  1.94k|#define MIN_FIRST_ALLOC 32
  ------------------
  |  Branch (89:8): [True: 0, False: 1.94k]
  ------------------
   90|      0|      a = s->toobig;
   91|  1.94k|    else if(fit < MIN_FIRST_ALLOC)
  ------------------
  |  |   29|  1.94k|#define MIN_FIRST_ALLOC 32
  ------------------
  |  Branch (91:13): [True: 1.85k, False: 84]
  ------------------
   92|  1.85k|      a = MIN_FIRST_ALLOC;
  ------------------
  |  |   29|  1.85k|#define MIN_FIRST_ALLOC 32
  ------------------
   93|     84|    else
   94|     84|      a = fit;
   95|  1.94k|  }
   96|   299k|  else {
   97|   303k|    while(a < fit)
  ------------------
  |  Branch (97:11): [True: 3.64k, False: 299k]
  ------------------
   98|  3.64k|      a *= 2;
   99|   299k|    if(a > s->toobig)
  ------------------
  |  Branch (99:8): [True: 17, False: 299k]
  ------------------
  100|       |      /* no point in allocating a larger buffer than this is allowed to use */
  101|     17|      a = s->toobig;
  102|   299k|  }
  103|       |
  104|   301k|  if(a != s->allc) {
  ------------------
  |  Branch (104:6): [True: 4.23k, False: 297k]
  ------------------
  105|  4.23k|    void *p = curlx_realloc(s->bufr, a);
  ------------------
  |  | 1427|  4.23k|  curl_dbg_realloc(ptr, size, __LINE__, __FILE__)
  ------------------
  106|  4.23k|    if(!p) {
  ------------------
  |  Branch (106:8): [True: 0, False: 4.23k]
  ------------------
  107|      0|      curlx_dyn_free(s);
  108|      0|      return CURLE_OUT_OF_MEMORY;
  109|      0|    }
  110|  4.23k|    s->bufr = p;
  111|  4.23k|    s->allc = a;
  112|  4.23k|  }
  113|       |
  114|   301k|  if(len)
  ------------------
  |  Branch (114:6): [True: 292k, False: 9.52k]
  ------------------
  115|   292k|    memcpy(&s->bufr[idx], mem, len);
  116|   301k|  s->leng = idx + len;
  117|   301k|  s->bufr[s->leng] = 0;
  118|   301k|  return CURLE_OK;
  119|   301k|}

curlx_memzero:
  113|    850|{
  114|    850|  if(buf)
  ------------------
  |  Branch (114:6): [True: 850, False: 0]
  ------------------
  115|    850|    curlx_memzero_low(buf, size);
  ------------------
  |  | 1602|    850|#define curlx_memzero_low(buf, size)  explicit_bzero(buf, size)
  ------------------
  116|    850|}

curlx_str_passblanks:
  314|   174k|{
  315|   223k|  while(ISBLANK(**linep))
  ------------------
  |  |   43|   223k|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (43:22): [True: 47.4k, False: 176k]
  |  |  |  Branch (43:38): [True: 2.28k, False: 174k]
  |  |  ------------------
  ------------------
  316|  49.7k|    (*linep)++; /* move over it */
  317|   174k|}

curl_global_init:
  229|      2|{
  230|      2|  CURLcode result;
  231|      2|  global_init_lock();
  ------------------
  |  |   92|      2|#define global_init_lock()   curl_simple_lock_lock(&s_lock)
  ------------------
  232|       |
  233|      2|  result = global_init(flags, TRUE);
  ------------------
  |  |  997|      2|#define TRUE true
  ------------------
  234|       |
  235|      2|  global_init_unlock();
  ------------------
  |  |   93|      2|#define global_init_unlock() curl_simple_lock_unlock(&s_lock)
  ------------------
  236|       |
  237|      2|  return result;
  238|      2|}
curl_easy_init:
  364|    753|{
  365|    753|  CURLcode result;
  366|    753|  struct Curl_easy *data;
  367|       |
  368|       |  /* Make sure we inited the global SSL stuff */
  369|    753|  global_init_lock();
  ------------------
  |  |   92|    753|#define global_init_lock()   curl_simple_lock_lock(&s_lock)
  ------------------
  370|       |
  371|    753|  if(!initialized) {
  ------------------
  |  Branch (371:6): [True: 0, False: 753]
  ------------------
  372|      0|    result = global_init(CURL_GLOBAL_DEFAULT, TRUE);
  ------------------
  |  | 3049|      0|#define CURL_GLOBAL_DEFAULT CURL_GLOBAL_ALL
  |  |  ------------------
  |  |  |  | 3047|      0|#define CURL_GLOBAL_ALL (CURL_GLOBAL_SSL | CURL_GLOBAL_WINSOCK)
  |  |  |  |  ------------------
  |  |  |  |  |  | 3044|      0|#define CURL_GLOBAL_SSL (1 << 0) /* no purpose since 7.57.0 */
  |  |  |  |  ------------------
  |  |  |  |               #define CURL_GLOBAL_ALL (CURL_GLOBAL_SSL | CURL_GLOBAL_WINSOCK)
  |  |  |  |  ------------------
  |  |  |  |  |  | 3045|      0|#define CURL_GLOBAL_WINSOCK (1 << 1)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  result = global_init(CURL_GLOBAL_DEFAULT, TRUE);
  ------------------
  |  |  997|      0|#define TRUE true
  ------------------
  373|      0|    if(result) {
  ------------------
  |  Branch (373:8): [True: 0, False: 0]
  ------------------
  374|       |      /* something in the global init failed, return nothing */
  375|      0|      DEBUGF(curl_mfprintf(stderr, "Error: curl_global_init failed\n"));
  ------------------
  |  | 1013|      0|#define DEBUGF(x) x
  ------------------
  376|      0|      global_init_unlock();
  ------------------
  |  |   93|      0|#define global_init_unlock() curl_simple_lock_unlock(&s_lock)
  ------------------
  377|      0|      return NULL;
  378|      0|    }
  379|      0|  }
  380|    753|  global_init_unlock();
  ------------------
  |  |   93|    753|#define global_init_unlock() curl_simple_lock_unlock(&s_lock)
  ------------------
  381|       |
  382|       |  /* We use Curl_open() with undefined URL so far */
  383|    753|  result = Curl_open(&data);
  384|    753|  if(result) {
  ------------------
  |  Branch (384:6): [True: 0, False: 753]
  ------------------
  385|      0|    DEBUGF(curl_mfprintf(stderr, "Error: Curl_open failed\n"));
  ------------------
  |  | 1013|      0|#define DEBUGF(x) x
  ------------------
  386|      0|    return NULL;
  387|      0|  }
  388|       |
  389|    753|  return data;
  390|    753|}
curl_easy_cleanup:
  882|    753|{
  883|    753|  struct Curl_eapi_guard guard;
  884|       |
  885|    753|  if(CURL_EAPI_ENTER(&guard, curl, easy_cleanup, NULL)) {
  ------------------
  |  |  163|    753|  Curl_eapi_enter((g), (curl), CURL_EAPI_FN_##fn, (r)) && (curl)
  |  |  ------------------
  |  |  |  Branch (163:3): [True: 753, False: 0]
  |  |  |  Branch (163:59): [True: 753, False: 0]
  |  |  ------------------
  ------------------
  886|    753|    struct Curl_easy *data = curl;
  887|    753|    struct Curl_sigpipe_ctx sigpipe_ctx;
  888|    753|    sigpipe_ignore(data, &sigpipe_ctx);
  889|    753|    Curl_close(&data);
  890|    753|    sigpipe_restore(&sigpipe_ctx);
  891|    753|  }
  892|    753|  CURL_EAPI_LEAVE(&guard);
  ------------------
  |  |  165|    753|  Curl_eapi_leave(g)
  ------------------
  893|    753|}
easy.c:global_init:
  130|      2|{
  131|      2|  (void)flags;
  132|       |
  133|      2|  if(initialized++)
  ------------------
  |  Branch (133:6): [True: 0, False: 2]
  ------------------
  134|      0|    return CURLE_OK;
  135|       |
  136|      2|  if(memoryfuncs) {
  ------------------
  |  Branch (136:6): [True: 2, False: 0]
  ------------------
  137|       |    /* Setup the default memory functions here (again) */
  138|      2|    Curl_cmalloc = (curl_malloc_callback)malloc;
  139|      2|    Curl_cfree = (curl_free_callback)free;
  140|      2|    Curl_crealloc = (curl_realloc_callback)realloc;
  141|      2|    Curl_cstrdup = (curl_strdup_callback)CURLX_STRDUP_LOW;
  ------------------
  |  | 1417|      2|#define CURLX_STRDUP_LOW strdup
  ------------------
  142|      2|    Curl_ccalloc = (curl_calloc_callback)calloc;
  143|      2|  }
  144|       |
  145|       |#ifdef _WIN32
  146|       |  curlx_verify_windows_init();
  147|       |  curlx_now_init();
  148|       |#endif
  149|       |
  150|      2|  if(Curl_trc_init()) {
  ------------------
  |  Branch (150:6): [True: 0, False: 2]
  ------------------
  151|      0|    DEBUGF(curl_mfprintf(stderr, "Error: Curl_trc_init failed\n"));
  ------------------
  |  | 1013|      0|#define DEBUGF(x) x
  ------------------
  152|      0|    goto fail;
  153|      0|  }
  154|       |
  155|       |#ifdef USE_WINDOWS_SSPI
  156|       |  if(Curl_sspi_global_init()) {
  157|       |    DEBUGF(curl_mfprintf(stderr, "Error: Curl_sspi_global_init() failed\n"));
  158|       |    goto fail;
  159|       |  }
  160|       |#endif
  161|       |
  162|       |#ifdef USE_WINSOCK
  163|       |  /* CURL_GLOBAL_WINSOCK controls the *optional* part of the Windows
  164|       |     initialization which is for the Windows sockets library (Winsock). */
  165|       |  if(flags & CURL_GLOBAL_WINSOCK) {
  166|       |    WSADATA wsa;
  167|       |    if(WSAStartup(MAKEWORD(2, 2), &wsa)) {
  168|       |      DEBUGF(curl_mfprintf(stderr, "Error: WSAStartup() failed\n"));
  169|       |      goto fail;
  170|       |    }
  171|       |    winsock_initialized = TRUE;
  172|       |  }
  173|       |#endif
  174|       |
  175|      2|  if(!Curl_ssl_init()) {
  ------------------
  |  Branch (175:6): [True: 0, False: 2]
  ------------------
  176|      0|    DEBUGF(curl_mfprintf(stderr, "Error: Curl_ssl_init failed\n"));
  ------------------
  |  | 1013|      0|#define DEBUGF(x) x
  ------------------
  177|      0|    goto fail;
  178|      0|  }
  179|       |
  180|      2|  if(!Curl_vquic_init()) {
  ------------------
  |  |   84|      2|#define Curl_vquic_init() 1
  ------------------
  |  Branch (180:6): [Folded, False: 2]
  ------------------
  181|      0|    DEBUGF(curl_mfprintf(stderr, "Error: Curl_vquic_init failed\n"));
  ------------------
  |  | 1013|      0|#define DEBUGF(x) x
  ------------------
  182|      0|    goto fail;
  183|      0|  }
  184|       |
  185|      2|  if(Curl_amiga_init()) {
  ------------------
  |  |   36|      2|#define Curl_amiga_init()    CURLE_OK
  |  |  ------------------
  |  |  |  Branch (36:30): [Folded, False: 2]
  |  |  ------------------
  ------------------
  186|      0|    DEBUGF(curl_mfprintf(stderr, "Error: Curl_amiga_init failed\n"));
  ------------------
  |  | 1013|      0|#define DEBUGF(x) x
  ------------------
  187|      0|    goto fail;
  188|      0|  }
  189|       |
  190|      2|  if(Curl_macos_init()) {
  ------------------
  |  |   31|      2|#define Curl_macos_init() CURLE_OK
  |  |  ------------------
  |  |  |  Branch (31:27): [Folded, False: 2]
  |  |  ------------------
  ------------------
  191|      0|    DEBUGF(curl_mfprintf(stderr, "Error: Curl_macos_init failed\n"));
  ------------------
  |  | 1013|      0|#define DEBUGF(x) x
  ------------------
  192|      0|    goto fail;
  193|      0|  }
  194|       |
  195|      2|  if(Curl_async_global_init()) {
  ------------------
  |  Branch (195:6): [True: 0, False: 2]
  ------------------
  196|      0|    DEBUGF(curl_mfprintf(stderr, "Error: Curl_async_global_init failed\n"));
  ------------------
  |  | 1013|      0|#define DEBUGF(x) x
  ------------------
  197|      0|    goto fail;
  198|      0|  }
  199|       |
  200|      2|  if(Curl_ssh_init()) {
  ------------------
  |  |  259|      2|#define Curl_ssh_init() 0
  |  |  ------------------
  |  |  |  Branch (259:25): [Folded, False: 2]
  |  |  ------------------
  ------------------
  201|      0|    DEBUGF(curl_mfprintf(stderr, "Error: Curl_ssh_init failed\n"));
  ------------------
  |  | 1013|      0|#define DEBUGF(x) x
  ------------------
  202|      0|    goto fail;
  203|      0|  }
  204|       |
  205|      2|#ifdef DEBUGBUILD
  206|      2|  if(getenv("CURL_GLOBAL_INIT"))
  ------------------
  |  Branch (206:6): [True: 0, False: 2]
  ------------------
  207|       |    /* alloc data that will leak if *cleanup() is not called! */
  208|      0|    leakpointer = curlx_malloc(1);
  ------------------
  |  | 1423|      0|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
  209|      2|#endif
  210|       |
  211|      2|  return CURLE_OK;
  212|       |
  213|      0|fail:
  214|       |#ifdef USE_WINSOCK
  215|       |  if(winsock_initialized) {
  216|       |    WSACleanup();
  217|       |    winsock_initialized = FALSE;
  218|       |  }
  219|       |#endif
  220|      0|  initialized--; /* undo the increase */
  221|      0|  return CURLE_FAILED_INIT;
  222|      2|}

easy.c:curl_simple_lock_lock:
   64|    755|{
   65|    755|  for(;;) {
   66|    755|    if(!atomic_exchange_explicit(lock, true, memory_order_acquire))
  ------------------
  |  Branch (66:8): [True: 755, False: 0]
  ------------------
   67|    755|      break;
   68|       |    /* Reduce cache coherency traffic */
   69|      0|    while(atomic_load_explicit(lock, memory_order_relaxed)) {
  ------------------
  |  Branch (69:11): [True: 0, False: 0]
  ------------------
   70|       |      /* Reduce load (not mandatory) */
   71|      0|#ifdef HAVE_BUILTIN_IA32_PAUSE
   72|      0|      __builtin_ia32_pause();
   73|       |#elif defined(__aarch64__)
   74|       |      /* NOLINTNEXTLINE(portability-no-assembler) */
   75|       |      __asm__ volatile("yield" ::: "memory");
   76|       |#elif defined(HAVE_SCHED_YIELD)
   77|       |      sched_yield();
   78|       |#endif
   79|      0|    }
   80|      0|  }
   81|    755|}
easy.c:curl_simple_lock_unlock:
   84|    755|{
   85|    755|  atomic_store_explicit(lock, false, memory_order_release);
   86|    755|}

Curl_wildcard_dtor:
  189|    753|{
  190|    753|  struct WildcardData *wc = *wcp;
  191|    753|  if(!wc)
  ------------------
  |  Branch (191:6): [True: 753, False: 0]
  ------------------
  192|    753|    return;
  193|       |
  194|      0|  if(wc->dtor) {
  ------------------
  |  Branch (194:6): [True: 0, False: 0]
  ------------------
  195|      0|    wc->dtor(wc->ftpwc);
  196|      0|    wc->dtor = ZERO_NULL;
  ------------------
  |  | 1110|      0|#define ZERO_NULL 0
  ------------------
  197|      0|    wc->ftpwc = NULL;
  198|      0|  }
  199|      0|  DEBUGASSERT(!wc->ftpwc);
  ------------------
  |  | 1027|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (199:3): [True: 0, False: 0]
  |  Branch (199:3): [True: 0, False: 0]
  ------------------
  200|       |
  201|      0|  Curl_llist_destroy(&wc->filelist, NULL);
  202|      0|  curlx_safefree(wc->path);
  ------------------
  |  | 1284|      0|  do {                      \
  |  | 1285|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1428|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1286|      0|    (ptr) = NULL;           \
  |  | 1287|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1287:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  203|      0|  curlx_safefree(wc->pattern);
  ------------------
  |  | 1284|      0|  do {                      \
  |  | 1285|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1428|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1286|      0|    (ptr) = NULL;           \
  |  | 1287|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1287:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  204|      0|  wc->state = CURLWC_INIT;
  205|      0|  curlx_free(wc);
  ------------------
  |  | 1428|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  206|       |  *wcp = NULL;
  207|      0|}

Curl_initinfo:
   42|    753|{
   43|    753|  struct Progress *pro = &data->progress;
   44|    753|  struct PureInfo *info = &data->info;
   45|       |
   46|    753|  memset(&pro->delta, 0, sizeof(pro->delta));
   47|    753|  memset(&pro->total, 0, sizeof(pro->total));
   48|    753|  pro->startransfer_added = FALSE;
  ------------------
  |  | 1000|    753|#define FALSE false
  ------------------
   49|       |
   50|    753|  info->httpcode = 0;
   51|    753|  info->httpproxycode = 0;
   52|    753|  info->httpversion = 0;
   53|    753|  info->filetime = -1; /* -1 is an illegal time and thus means unknown */
   54|    753|  info->timecond = FALSE;
  ------------------
  |  | 1000|    753|#define FALSE false
  ------------------
   55|       |
   56|    753|  info->header_size = 0;
   57|    753|  info->request_size = 0;
   58|    753|  info->proxyauthavail = 0;
   59|    753|  info->httpauthavail = 0;
   60|    753|  info->proxyauthpicked = 0;
   61|    753|  info->httpauthpicked = 0;
   62|    753|  info->numconnects = 0;
   63|       |
   64|    753|  curlx_safefree(info->contenttype);
  ------------------
  |  | 1284|    753|  do {                      \
  |  | 1285|    753|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1428|    753|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1286|    753|    (ptr) = NULL;           \
  |  | 1287|    753|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1287:11): [Folded, False: 753]
  |  |  ------------------
  ------------------
   65|    753|  curlx_safefree(info->wouldredirect);
  ------------------
  |  | 1284|    753|  do {                      \
  |  | 1285|    753|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1428|    753|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1286|    753|    (ptr) = NULL;           \
  |  | 1287|    753|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1287:11): [Folded, False: 753]
  |  |  ------------------
  ------------------
   66|       |
   67|    753|  memset(&info->primary, 0, sizeof(info->primary));
   68|    753|  info->retry_after = 0;
   69|       |
   70|    753|  info->conn_scheme = 0;
   71|    753|  info->conn_protocol = 0;
   72|    753|  info->used_proxy = 0;
   73|       |
   74|    753|#ifdef USE_SSL
   75|    753|  Curl_ssl_free_certinfo(data);
   76|    753|#endif
   77|    753|}

Curl_hash_init:
  176|    753|{
  177|    753|  DEBUGASSERT(h);
  ------------------
  |  | 1027|    753|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (177:3): [True: 0, False: 753]
  |  Branch (177:3): [True: 753, False: 0]
  ------------------
  178|    753|  DEBUGASSERT(slots);
  ------------------
  |  | 1027|    753|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (178:3): [True: 0, False: 753]
  |  Branch (178:3): [True: 753, False: 0]
  ------------------
  179|    753|  DEBUGASSERT((unsigned int)type < CURL_HASH_TYPE_LAST);
  ------------------
  |  | 1027|    753|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (179:3): [True: 0, False: 753]
  |  Branch (179:3): [True: 753, False: 0]
  ------------------
  180|    753|  DEBUGASSERT(dtor);
  ------------------
  |  | 1027|    753|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (180:3): [True: 0, False: 753]
  |  Branch (180:3): [True: 753, False: 0]
  ------------------
  181|       |
  182|    753|  h->table = NULL;
  183|    753|  h->dtor = dtor;
  184|    753|  h->size = 0;
  185|    753|  h->slots = slots;
  186|    753|  h->type = (uint8_t)type;
  187|    753|#ifdef DEBUGBUILD
  188|    753|  h->init = HASHINIT;
  ------------------
  |  |   32|    753|#define HASHINIT 0x7017e781
  ------------------
  189|    753|#endif
  190|    753|}
Curl_hash_destroy:
  369|    753|{
  370|    753|  DEBUGASSERT(h->init == HASHINIT);
  ------------------
  |  | 1027|    753|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (370:3): [True: 0, False: 753]
  |  Branch (370:3): [True: 753, False: 0]
  ------------------
  371|    753|  if(h->table) {
  ------------------
  |  Branch (371:6): [True: 0, False: 753]
  ------------------
  372|      0|    Curl_hash_clean(h);
  373|      0|    curlx_safefree(h->table);
  ------------------
  |  | 1284|      0|  do {                      \
  |  | 1285|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1428|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1286|      0|    (ptr) = NULL;           \
  |  | 1287|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1287:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  374|      0|  }
  375|    753|  DEBUGASSERT(h->size == 0);
  ------------------
  |  | 1027|    753|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (375:3): [True: 0, False: 753]
  |  Branch (375:3): [True: 753, False: 0]
  ------------------
  376|    753|  h->slots = 0;
  377|    753|}

Curl_headers_cleanup:
  470|    753|{
  471|    753|  struct Curl_llist_node *e;
  472|    753|  struct Curl_llist_node *n;
  473|       |
  474|    753|  for(e = Curl_llist_head(&data->state.httphdrs); e; e = n) {
  ------------------
  |  Branch (474:51): [True: 0, False: 753]
  ------------------
  475|      0|    struct Curl_header_store *hs = Curl_node_elem(e);
  476|      0|    n = Curl_node_next(e);
  477|      0|    curlx_free(hs);
  ------------------
  |  | 1428|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  478|      0|  }
  479|    753|  headers_reset(data);
  480|    753|  return CURLE_OK;
  481|    753|}
headers.c:headers_reset:
  403|    753|{
  404|       |  Curl_llist_init(&data->state.httphdrs, NULL);
  405|    753|  data->state.nh_count = 0;
  406|    753|}

Curl_hsts_cleanup:
   80|    753|{
   81|    753|  struct hsts *h = *hp;
   82|    753|  if(h) {
  ------------------
  |  Branch (82:6): [True: 0, False: 753]
  ------------------
   83|      0|    struct Curl_llist_node *e;
   84|      0|    struct Curl_llist_node *n;
   85|      0|    for(e = Curl_llist_head(&h->list); e; e = n) {
  ------------------
  |  Branch (85:40): [True: 0, False: 0]
  ------------------
   86|      0|      struct stsentry *sts = Curl_node_elem(e);
   87|      0|      n = Curl_node_next(e);
   88|      0|      hsts_free(sts);
  ------------------
  |  |   77|      0|#define hsts_free(x) curlx_free(x)
  |  |  ------------------
  |  |  |  | 1428|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  ------------------
   89|      0|    }
   90|      0|    curlx_free(h->filename);
  ------------------
  |  | 1428|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   91|      0|    curlx_free(h);
  ------------------
  |  | 1428|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   92|       |    *hp = NULL;
   93|      0|  }
   94|    753|}
Curl_hsts_save:
  371|    753|{
  372|    753|  struct Curl_llist_node *e;
  373|    753|  struct Curl_llist_node *n;
  374|    753|  CURLcode result = CURLE_OK;
  375|    753|  FILE *out;
  376|    753|  char *tempstore = NULL;
  377|       |
  378|    753|  if(!h)
  ------------------
  |  Branch (378:6): [True: 753, False: 0]
  ------------------
  379|       |    /* no cache activated */
  380|    753|    return CURLE_OK;
  381|       |
  382|       |  /* if no new name is given, use the one we stored from the load */
  383|      0|  if(!file && h->filename)
  ------------------
  |  Branch (383:6): [True: 0, False: 0]
  |  Branch (383:15): [True: 0, False: 0]
  ------------------
  384|      0|    file = h->filename;
  385|       |
  386|      0|  if((h->flags & CURLHSTS_READONLYFILE) || !file || !file[0])
  ------------------
  |  | 1084|      0|#define CURLHSTS_READONLYFILE (1L << 1)
  ------------------
  |  Branch (386:6): [True: 0, False: 0]
  |  Branch (386:44): [True: 0, False: 0]
  |  Branch (386:53): [True: 0, False: 0]
  ------------------
  387|       |    /* marked as read-only, no file or zero length filename */
  388|      0|    goto skipsave;
  389|       |
  390|      0|  result = Curl_fopen(data, file, &out, &tempstore);
  391|      0|  if(!result) {
  ------------------
  |  Branch (391:6): [True: 0, False: 0]
  ------------------
  392|      0|    fputs("# Your HSTS cache. https://curl.se/docs/hsts.html\n"
  393|      0|          "# This file was generated by libcurl! Edit at your own risk.\n",
  394|      0|          out);
  395|      0|    for(e = Curl_llist_head(&h->list); e; e = n) {
  ------------------
  |  Branch (395:40): [True: 0, False: 0]
  ------------------
  396|      0|      struct stsentry *sts = Curl_node_elem(e);
  397|      0|      n = Curl_node_next(e);
  398|      0|      hsts_out(sts, out);
  399|      0|    }
  400|      0|    curlx_fclose(out);
  ------------------
  |  |   81|      0|#define curlx_fclose(file)      curl_dbg_fclose(file, __LINE__, __FILE__)
  ------------------
  401|      0|    if(!result && tempstore && curlx_rename(tempstore, file))
  ------------------
  |  |   72|      0|#define curlx_rename            rename
  ------------------
  |  Branch (401:8): [True: 0, False: 0]
  |  Branch (401:19): [True: 0, False: 0]
  |  Branch (401:32): [True: 0, False: 0]
  ------------------
  402|      0|      result = CURLE_WRITE_ERROR;
  403|       |
  404|      0|    if(result && tempstore)
  ------------------
  |  Branch (404:8): [True: 0, False: 0]
  |  Branch (404:18): [True: 0, False: 0]
  ------------------
  405|      0|      unlink(tempstore);
  406|      0|  }
  407|      0|  curlx_free(tempstore);
  ------------------
  |  | 1428|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  408|      0|skipsave:
  409|      0|  if(data->set.hsts_write) {
  ------------------
  |  Branch (409:6): [True: 0, False: 0]
  ------------------
  410|       |    /* if there is a write callback */
  411|      0|    struct curl_index i; /* count */
  412|      0|    i.total = Curl_llist_count(&h->list);
  413|      0|    i.index = 0;
  414|      0|    for(e = Curl_llist_head(&h->list); e; e = n) {
  ------------------
  |  Branch (414:40): [True: 0, False: 0]
  ------------------
  415|      0|      struct stsentry *sts = Curl_node_elem(e);
  416|      0|      bool stop;
  417|      0|      n = Curl_node_next(e);
  418|      0|      result = hsts_push(data, &i, sts, &stop);
  419|      0|      if(result || stop)
  ------------------
  |  Branch (419:10): [True: 0, False: 0]
  |  Branch (419:20): [True: 0, False: 0]
  ------------------
  420|      0|        break;
  421|      0|      i.index++;
  422|      0|    }
  423|      0|  }
  424|      0|  return result;
  425|      0|}

Curl_http_auth_cleanup_digest:
  183|    753|{
  184|    753|  Curl_auth_digest_cleanup(&data->state.digest);
  185|    753|  Curl_auth_digest_cleanup(&data->state.proxydigest);
  186|    753|}

Curl_llist_init:
   46|  1.50k|{
   47|  1.50k|  l->_size = 0;
   48|  1.50k|  l->_dtor = dtor;
   49|  1.50k|  l->_head = NULL;
   50|  1.50k|  l->_tail = NULL;
   51|  1.50k|#ifdef DEBUGBUILD
   52|  1.50k|  l->_init = LLISTINIT;
  ------------------
  |  |   29|  1.50k|#define LLISTINIT 0x100cc001 /* random pattern */
  ------------------
   53|  1.50k|#endif
   54|  1.50k|}
Curl_llist_head:
  207|    753|{
  208|    753|  DEBUGASSERT(list);
  ------------------
  |  | 1027|    753|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (208:3): [True: 0, False: 753]
  |  Branch (208:3): [True: 753, False: 0]
  ------------------
  209|    753|  DEBUGASSERT(list->_init == LLISTINIT);
  ------------------
  |  | 1027|    753|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (209:3): [True: 0, False: 753]
  |  Branch (209:3): [True: 753, False: 0]
  ------------------
  210|    753|  return VERIFYNODE(list->_head);
  ------------------
  |  |   33|    753|#define VERIFYNODE(x) verifynode(x)
  ------------------
  211|    753|}
llist.c:verifynode:
   35|    753|{
   36|    753|  DEBUGASSERT(!n || (n->_init == NODEINIT));
  ------------------
  |  | 1027|    753|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (36:3): [True: 753, False: 0]
  |  Branch (36:3): [True: 0, False: 0]
  |  Branch (36:3): [True: 753, False: 0]
  |  Branch (36:3): [True: 0, False: 0]
  ------------------
   37|    753|  return n;
   38|    753|}

curl_dbg_malloc:
  212|  6.39k|{
  213|  6.39k|  struct memdebug *mem;
  214|  6.39k|  size_t size;
  215|       |
  216|  6.39k|  DEBUGASSERT(wantedsize != 0);
  ------------------
  |  | 1027|  6.39k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (216:3): [True: 0, False: 6.39k]
  |  Branch (216:3): [True: 6.39k, False: 0]
  ------------------
  217|       |
  218|  6.39k|  if(countcheck("malloc", line, source))
  ------------------
  |  Branch (218:6): [True: 0, False: 6.39k]
  ------------------
  219|      0|    return NULL;
  220|       |
  221|       |  /* alloc at least 64 bytes */
  222|  6.39k|  size = sizeof(struct memdebug) + wantedsize;
  223|       |
  224|  6.39k|  mem = Curl_cmalloc(size);
  225|  6.39k|  if(mem) {
  ------------------
  |  Branch (225:6): [True: 6.39k, False: 0]
  ------------------
  226|  6.39k|    mem->size = wantedsize;
  227|  6.39k|  }
  228|       |
  229|  6.39k|  if(source)
  ------------------
  |  Branch (229:6): [True: 0, False: 6.39k]
  ------------------
  230|      0|    curl_dbg_log("MEM %s:%d malloc(%zu) = %p\n",
  231|      0|                 source, line, wantedsize,
  232|      0|                 mem ? (void *)mem->mem : (void *)0);
  ------------------
  |  Branch (232:18): [True: 0, False: 0]
  ------------------
  233|       |
  234|  6.39k|  return mem ? mem->mem : NULL;
  ------------------
  |  Branch (234:10): [True: 6.39k, False: 0]
  ------------------
  235|  6.39k|}
curl_dbg_calloc:
  240|    850|{
  241|    850|  struct memdebug *mem;
  242|    850|  size_t size, user_size;
  243|       |
  244|    850|  DEBUGASSERT(wanted_elements != 0);
  ------------------
  |  | 1027|    850|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (244:3): [True: 0, False: 850]
  |  Branch (244:3): [True: 850, False: 0]
  ------------------
  245|    850|  DEBUGASSERT(wanted_size != 0);
  ------------------
  |  | 1027|    850|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (245:3): [True: 0, False: 850]
  |  Branch (245:3): [True: 850, False: 0]
  ------------------
  246|       |
  247|    850|  if(countcheck("calloc", line, source))
  ------------------
  |  Branch (247:6): [True: 0, False: 850]
  ------------------
  248|      0|    return NULL;
  249|       |
  250|       |  /* alloc at least 64 bytes */
  251|    850|  user_size = wanted_size * wanted_elements;
  252|    850|  size = sizeof(struct memdebug) + user_size;
  253|       |
  254|    850|  mem = Curl_ccalloc(1, size);
  255|    850|  if(mem)
  ------------------
  |  Branch (255:6): [True: 850, False: 0]
  ------------------
  256|    850|    mem->size = user_size;
  257|       |
  258|    850|  if(source)
  ------------------
  |  Branch (258:6): [True: 850, False: 0]
  ------------------
  259|    850|    curl_dbg_log("MEM %s:%d calloc(%zu,%zu) = %p\n",
  260|    850|                 source, line, wanted_elements, wanted_size,
  261|    850|                 mem ? (void *)mem->mem : (void *)0);
  ------------------
  |  Branch (261:18): [True: 850, False: 0]
  ------------------
  262|       |
  263|    850|  return mem ? mem->mem : NULL;
  ------------------
  |  Branch (263:10): [True: 850, False: 0]
  ------------------
  264|    850|}
curl_dbg_strdup:
  268|  6.39k|{
  269|  6.39k|  char *mem;
  270|  6.39k|  size_t len;
  271|       |
  272|  6.39k|  DEBUGASSERT(str);
  ------------------
  |  | 1027|  6.39k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (272:3): [True: 0, False: 6.39k]
  |  Branch (272:3): [True: 6.39k, False: 0]
  ------------------
  273|       |
  274|  6.39k|  if(countcheck("strdup", line, source))
  ------------------
  |  Branch (274:6): [True: 0, False: 6.39k]
  ------------------
  275|      0|    return NULL;
  276|       |
  277|  6.39k|  len = strlen(str) + 1;
  278|       |
  279|  6.39k|  mem = curl_dbg_malloc(len, 0, NULL); /* NULL prevents logging */
  280|  6.39k|  if(mem)
  ------------------
  |  Branch (280:6): [True: 6.39k, False: 0]
  ------------------
  281|  6.39k|    memcpy(mem, str, len);
  282|       |
  283|  6.39k|  if(source)
  ------------------
  |  Branch (283:6): [True: 6.39k, False: 0]
  ------------------
  284|  6.39k|    curl_dbg_log("MEM %s:%d strdup(%p) (%zu) = %p\n",
  285|  6.39k|                 source, line, (const void *)str, len, (const void *)mem);
  286|       |
  287|  6.39k|  return mem;
  288|  6.39k|}
curl_dbg_realloc:
  321|  4.23k|{
  322|  4.23k|  struct memdebug *mem = NULL;
  323|  4.23k|  bool was_locked;
  324|       |
  325|  4.23k|  size_t size = sizeof(struct memdebug) + wantedsize;
  326|       |
  327|  4.23k|  DEBUGASSERT(wantedsize != 0);
  ------------------
  |  | 1027|  4.23k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (327:3): [True: 0, False: 4.23k]
  |  Branch (327:3): [True: 4.23k, False: 0]
  ------------------
  328|       |
  329|  4.23k|  if(countcheck("realloc", line, source))
  ------------------
  |  Branch (329:6): [True: 0, False: 4.23k]
  ------------------
  330|      0|    return NULL;
  331|       |
  332|       |  /* need to realloc under lock, as we get out-of-order log
  333|       |   * entries otherwise, since another thread might alloc the
  334|       |   * memory released by realloc() before otherwise would log it. */
  335|  4.23k|  was_locked = curl_dbg_lock();
  336|       |#ifdef __INTEL_COMPILER
  337|       |#  pragma warning(push)
  338|       |#  pragma warning(disable:1684)
  339|       |   /* 1684: conversion from pointer to same-sized integral type */
  340|       |#endif
  341|       |
  342|  4.23k|  if(ptr)
  ------------------
  |  Branch (342:6): [True: 2.29k, False: 1.94k]
  ------------------
  343|  2.29k|    mem = (void *)((char *)ptr - offsetof(struct memdebug, mem));
  344|       |
  345|       |#ifdef __INTEL_COMPILER
  346|       |#  pragma warning(pop)
  347|       |#endif
  348|       |
  349|  4.23k|  mem = Curl_crealloc(mem, size);
  350|  4.23k|  if(source)
  ------------------
  |  Branch (350:6): [True: 4.23k, False: 0]
  ------------------
  351|  4.23k|    curl_dbg_log_locked("MEM %s:%d realloc(%p, %zu) = %p\n",
  352|  4.23k|                        source, line, (void *)ptr, wantedsize,
  353|  4.23k|                        mem ? (void *)mem->mem : (void *)0);
  ------------------
  |  Branch (353:25): [True: 4.23k, False: 0]
  ------------------
  354|       |
  355|  4.23k|  curl_dbg_unlock(was_locked);
  356|  4.23k|  if(mem) {
  ------------------
  |  Branch (356:6): [True: 4.23k, False: 0]
  ------------------
  357|  4.23k|    mem->size = wantedsize;
  358|  4.23k|    return mem->mem;
  359|  4.23k|  }
  360|       |
  361|      0|  return NULL;
  362|  4.23k|}
curl_dbg_free:
  365|  76.6k|{
  366|  76.6k|  if(ptr) {
  ------------------
  |  Branch (366:6): [True: 9.18k, False: 67.4k]
  ------------------
  367|  9.18k|    struct memdebug *mem;
  368|       |
  369|  9.18k|    if(source)
  ------------------
  |  Branch (369:8): [True: 9.18k, False: 0]
  ------------------
  370|  9.18k|      curl_dbg_log("MEM %s:%d free(%p)\n", source, line, (void *)ptr);
  371|       |
  372|       |#ifdef __INTEL_COMPILER
  373|       |#  pragma warning(push)
  374|       |#  pragma warning(disable:1684)
  375|       |   /* 1684: conversion from pointer to same-sized integral type */
  376|       |#endif
  377|       |
  378|  9.18k|    mem = (void *)((char *)ptr - offsetof(struct memdebug, mem));
  379|       |
  380|       |#ifdef __INTEL_COMPILER
  381|       |#  pragma warning(pop)
  382|       |#endif
  383|       |
  384|       |    /* free for real */
  385|  9.18k|    Curl_cfree(mem);
  386|  9.18k|  }
  387|  76.6k|}
curl_dbg_fopen:
  477|    753|{
  478|    753|  FILE *res = CURLX_FOPEN_LOW(file, mode);
  ------------------
  |  |   66|    753|#define CURLX_FOPEN_LOW         fopen
  ------------------
  479|    753|  if(source)
  ------------------
  |  Branch (479:6): [True: 753, False: 0]
  ------------------
  480|    753|    curl_dbg_log("FILE %s:%d fopen(\"%s\",\"%s\") = %p\n",
  481|    753|                 source, line, file, mode, (void *)res);
  482|       |
  483|    753|  return res;
  484|    753|}
curl_dbg_fclose:
  510|    753|{
  511|    753|  int res;
  512|       |
  513|    753|  DEBUGASSERT(file);
  ------------------
  |  | 1027|    753|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (513:3): [True: 0, False: 753]
  |  Branch (513:3): [True: 753, False: 0]
  ------------------
  514|       |
  515|    753|  if(source)
  ------------------
  |  Branch (515:6): [True: 753, False: 0]
  ------------------
  516|    753|    curl_dbg_log("FILE %s:%d fclose(%p)\n", source, line, (void *)file);
  517|       |
  518|       |  /* !checksrc! disable BANNEDFUNC 1 */
  519|    753|  res = fclose(file);
  520|       |
  521|    753|  return res;
  522|    753|}
curl_dbg_log:
  565|  17.9k|{
  566|  17.9k|  bool was_locked;
  567|  17.9k|  va_list ap;
  568|       |
  569|  17.9k|  if(!curl_dbg_logfile)
  ------------------
  |  Branch (569:6): [True: 17.9k, False: 0]
  ------------------
  570|  17.9k|    return;
  571|       |
  572|      0|  was_locked = curl_dbg_lock();
  573|      0|  va_start(ap, format);
  574|      0|  curl_dbg_vlog(format, ap);
  575|       |  va_end(ap);
  576|      0|  curl_dbg_unlock(was_locked);
  577|      0|}
memdebug.c:countcheck:
  187|  17.8k|{
  188|       |  /* if source is NULL, then the call is made internally and this check
  189|       |     should not be made */
  190|  17.8k|  if(memlimit && source) {
  ------------------
  |  Branch (190:6): [True: 0, False: 17.8k]
  |  Branch (190:18): [True: 0, False: 0]
  ------------------
  191|      0|    if(!memsize) {
  ------------------
  |  Branch (191:8): [True: 0, False: 0]
  ------------------
  192|       |      /* log to file */
  193|      0|      curl_dbg_log("LIMIT %s:%d %s reached memlimit\n", source, line, func);
  194|       |      /* log to stderr also */
  195|      0|      curl_mfprintf(stderr, "LIMIT %s:%d %s reached memlimit\n",
  196|      0|                    source, line, func);
  197|      0|      dump_bt();
  198|      0|      fflush(curl_dbg_logfile); /* because it might crash now */
  199|       |      /* !checksrc! disable ERRNOVAR 1 */
  200|      0|      errno = ENOMEM;
  201|      0|      return TRUE; /* RETURN ERROR! */
  ------------------
  |  |  997|      0|#define TRUE true
  ------------------
  202|      0|    }
  203|      0|    else
  204|      0|      memsize--; /* countdown */
  205|      0|  }
  206|       |
  207|  17.8k|  return FALSE; /* allow this */
  ------------------
  |  | 1000|  17.8k|#define FALSE false
  ------------------
  208|  17.8k|}
memdebug.c:curl_dbg_lock:
   74|  4.23k|{
   75|  4.23k|#ifdef USE_MUTEX
   76|  4.23k|  if(dbg_mutex_init) {
  ------------------
  |  Branch (76:6): [True: 0, False: 4.23k]
  ------------------
   77|      0|    Curl_mutex_acquire(&dbg_mutex);
  ------------------
  |  |   51|      0|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
   78|      0|    return TRUE;
  ------------------
  |  |  997|      0|#define TRUE true
  ------------------
   79|      0|  }
   80|  4.23k|#endif
   81|  4.23k|  return FALSE;
  ------------------
  |  | 1000|  4.23k|#define FALSE false
  ------------------
   82|  4.23k|}
memdebug.c:curl_dbg_unlock:
   85|  4.23k|{
   86|  4.23k|#ifdef USE_MUTEX
   87|  4.23k|  if(was_locked)
  ------------------
  |  Branch (87:6): [True: 0, False: 4.23k]
  ------------------
   88|      0|    Curl_mutex_release(&dbg_mutex);
  ------------------
  |  |   52|      0|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
   89|       |#else
   90|       |  (void)was_locked;
   91|       |#endif
   92|  4.23k|}
memdebug.c:curl_dbg_log_locked:
  552|  4.23k|{
  553|  4.23k|  va_list ap;
  554|       |
  555|  4.23k|  if(!curl_dbg_logfile)
  ------------------
  |  Branch (555:6): [True: 4.23k, False: 0]
  ------------------
  556|  4.23k|    return;
  557|       |
  558|  4.23k|  va_start(ap, format);
  559|      0|  curl_dbg_vlog(format, ap);
  560|       |  va_end(ap);
  561|      0|}

Curl_mime_cleanpart:
 1099|  1.50k|{
 1100|  1.50k|  if(part) {
  ------------------
  |  Branch (1100:6): [True: 0, False: 1.50k]
  ------------------
 1101|      0|    cleanup_part_content(part);
 1102|      0|    curl_slist_free_all(part->curlheaders);
 1103|      0|    if(part->flags & MIME_USERHEADERS_OWNER)
  ------------------
  |  |   34|      0|#define MIME_USERHEADERS_OWNER  (1 << 0)
  ------------------
  |  Branch (1103:8): [True: 0, False: 0]
  ------------------
 1104|      0|      curl_slist_free_all(part->userheaders);
 1105|      0|    curlx_safefree(part->mimetype);
  ------------------
  |  | 1284|      0|  do {                      \
  |  | 1285|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1428|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1286|      0|    (ptr) = NULL;           \
  |  | 1287|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1287:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1106|      0|    curlx_safefree(part->name);
  ------------------
  |  | 1284|      0|  do {                      \
  |  | 1285|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1428|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1286|      0|    (ptr) = NULL;           \
  |  | 1287|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1287:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1107|       |    curlx_safefree(part->filename);
  ------------------
  |  | 1284|      0|  do {                      \
  |  | 1285|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1428|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1286|      0|    (ptr) = NULL;           \
  |  | 1287|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1287:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1108|      0|    Curl_mime_initpart(part);
 1109|      0|  }
 1110|  1.50k|}

Curl_detach_connection:
  915|    753|{
  916|    753|  struct connectdata *conn = data->conn;
  917|    753|  if(conn) {
  ------------------
  |  Branch (917:6): [True: 0, False: 753]
  ------------------
  918|       |    /* this should never happen, prevent underflow */
  919|      0|    DEBUGASSERT(conn->attached_xfers);
  ------------------
  |  | 1027|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (919:5): [True: 0, False: 0]
  |  Branch (919:5): [True: 0, False: 0]
  ------------------
  920|      0|    if(conn->attached_xfers) {
  ------------------
  |  Branch (920:8): [True: 0, False: 0]
  ------------------
  921|      0|      conn->attached_xfers--;
  922|      0|      if(!conn->attached_xfers)
  ------------------
  |  Branch (922:10): [True: 0, False: 0]
  ------------------
  923|      0|        conn->attached_multi = NULL;
  924|      0|    }
  925|      0|  }
  926|    753|  data->conn = NULL;
  927|    753|}
Curl_expire_clear_all:
 3800|    753|{
 3801|    753|  struct Curl_multi *multi = data->multi;
 3802|       |
 3803|       |  /* this is only interesting while there is still an associated multi struct
 3804|       |     remaining! */
 3805|    753|  if(!multi)
  ------------------
  |  Branch (3805:6): [True: 753, False: 0]
  ------------------
 3806|    753|    return;
 3807|       |
 3808|      0|  if(Curl_timeouts_remove(&multi->timeouts, data)) {
  ------------------
  |  Branch (3808:6): [True: 0, False: 0]
  ------------------
 3809|       |    /* Since this is an cleared time, we must remove the previous entry from
 3810|       |       the splay tree */
 3811|      0|    multi_timeouts_init(data);
 3812|       |
 3813|      0|    if(data->id >= 0)
  ------------------
  |  Branch (3813:8): [True: 0, False: 0]
  ------------------
 3814|      0|      CURL_TRC_M(data, "[TIMEOUT] all cleared");
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3815|      0|  }
 3816|      0|}

Curl_netrc_scan:
  585|    753|{
  586|    753|  NETRCcode retcode = NETRC_OK;
  587|       |
  588|    753|  CURL_TRC_M(data, "[NETRC] scanning '%s' for host '%s' user '%s'",
  ------------------
  |  |  148|    753|  do {                                   \
  |  |  149|    753|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|    753|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|    753|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  1.50k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 753, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 753]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  1.50k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|    753|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|    753|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|    753|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 753]
  |  |  ------------------
  ------------------
  589|    753|             netrcfile, hostname, user);
  590|    753|  Curl_creds_unlink(pcreds);
  591|    753|  if(!netrcfile) {
  ------------------
  |  Branch (591:6): [True: 0, False: 753]
  ------------------
  592|      0|    char *home = NULL;
  593|      0|    char *homea = NULL;
  594|      0|    char *filealloc = NULL;
  595|      0|#if defined(HAVE_GETPWUID_R) && defined(HAVE_GETEUID)
  596|      0|    char pwbuf[1024];
  597|      0|#endif
  598|      0|    filealloc = curl_getenv("NETRC");
  599|      0|    if(!filealloc) {
  ------------------
  |  Branch (599:8): [True: 0, False: 0]
  ------------------
  600|      0|      homea = curl_getenv("HOME"); /* portable environment reader */
  601|      0|      if(homea) {
  ------------------
  |  Branch (601:10): [True: 0, False: 0]
  ------------------
  602|      0|        home = homea;
  603|      0|#if defined(HAVE_GETPWUID_R) && defined(HAVE_GETEUID)
  604|      0|      }
  605|      0|      else {
  606|      0|        struct passwd pw, *pw_res;
  607|      0|        if(!getpwuid_r(geteuid(), &pw, pwbuf, sizeof(pwbuf), &pw_res) &&
  ------------------
  |  Branch (607:12): [True: 0, False: 0]
  ------------------
  608|      0|           pw_res) {
  ------------------
  |  Branch (608:12): [True: 0, False: 0]
  ------------------
  609|      0|          home = pw.pw_dir;
  610|      0|        }
  611|       |#elif defined(HAVE_GETPWUID) && defined(HAVE_GETEUID)
  612|       |      }
  613|       |      else {
  614|       |        struct passwd *pw;
  615|       |        pw = getpwuid(geteuid());
  616|       |        if(pw) {
  617|       |          home = pw->pw_dir;
  618|       |        }
  619|       |#elif defined(_WIN32)
  620|       |      }
  621|       |      else {
  622|       |        homea = curl_getenv("USERPROFILE");
  623|       |        if(homea) {
  624|       |          home = homea;
  625|       |        }
  626|       |#endif
  627|      0|      }
  628|       |
  629|      0|      if(!home)
  ------------------
  |  Branch (629:10): [True: 0, False: 0]
  ------------------
  630|      0|        return NETRC_FILE_MISSING; /* no home directory found (or possibly out
  631|       |                                      of memory) */
  632|       |
  633|      0|      filealloc = curl_maprintf("%s%s.netrc", home, DIR_CHAR);
  ------------------
  |  |  625|      0|#  define DIR_CHAR      "/"
  ------------------
  634|      0|      if(!filealloc) {
  ------------------
  |  Branch (634:10): [True: 0, False: 0]
  ------------------
  635|      0|        curlx_free(homea);
  ------------------
  |  | 1428|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  636|      0|        retcode = NETRC_OUT_OF_MEMORY;
  637|      0|        goto out;
  638|      0|      }
  639|      0|    }
  640|      0|    retcode = netrc_scan_file(
  641|      0|      data, store, hostname, user, filealloc, pcreds);
  642|      0|    curlx_free(filealloc);
  ------------------
  |  | 1428|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  643|       |#ifdef _WIN32
  644|       |    if(retcode == NETRC_FILE_MISSING) {
  645|       |      /* fallback to the old-style "_netrc" file */
  646|       |      filealloc = curl_maprintf("%s%s_netrc", home, DIR_CHAR);
  647|       |      if(!filealloc) {
  648|       |        curlx_free(homea);
  649|       |        return NETRC_OUT_OF_MEMORY;
  650|       |      }
  651|       |      retcode = netrc_scan_file(
  652|       |        data, store, hostname, user, filealloc, pcreds);
  653|       |      curlx_free(filealloc);
  654|       |    }
  655|       |#endif
  656|      0|    curlx_free(homea);
  ------------------
  |  | 1428|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  657|      0|  }
  658|    753|  else
  659|    753|    retcode = netrc_scan_file(
  660|    753|      data, store, hostname, user, netrcfile, pcreds);
  661|       |
  662|    753|out:
  663|    753|  if(retcode)
  ------------------
  |  Branch (663:6): [True: 656, False: 97]
  ------------------
  664|    656|    Curl_creds_unlink(pcreds);
  665|    753|  return retcode;
  666|    753|}
Curl_netrc_init:
  669|  1.50k|{
  670|  1.50k|  curlx_dyn_init(&store->filebuf, MAX_NETRC_FILE);
  ------------------
  |  |   77|  1.50k|#define MAX_NETRC_FILE  (128 * 1024)
  ------------------
  671|  1.50k|  store->loaded = FALSE;
  ------------------
  |  | 1000|  1.50k|#define FALSE false
  ------------------
  672|       |  store->filename = NULL;
  673|  1.50k|}
Curl_netrc_cleanup:
  675|  1.50k|{
  676|  1.50k|  curlx_dyn_free(&store->filebuf);
  677|  1.50k|  curlx_safefree(store->filename);
  ------------------
  |  | 1284|  1.50k|  do {                      \
  |  | 1285|  1.50k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1428|  1.50k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1286|  1.50k|    (ptr) = NULL;           \
  |  | 1287|  1.50k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1287:11): [Folded, False: 1.50k]
  |  |  ------------------
  ------------------
  678|       |  store->loaded = FALSE;
  ------------------
  |  | 1000|  1.50k|#define FALSE false
  ------------------
  679|  1.50k|}
Curl_netrc_strerror:
  682|    758|{
  683|    758|  switch(ret) {
  684|     98|  default:
  ------------------
  |  Branch (684:3): [True: 98, False: 660]
  ------------------
  685|     98|    return ""; /* not a legit error */
  686|      1|  case NETRC_FILE_MISSING:
  ------------------
  |  Branch (686:3): [True: 1, False: 757]
  ------------------
  687|      1|    return "no such file";
  688|    520|  case NETRC_NO_MATCH:
  ------------------
  |  Branch (688:3): [True: 520, False: 238]
  ------------------
  689|    520|    return "no matching entry";
  690|      1|  case NETRC_OUT_OF_MEMORY:
  ------------------
  |  Branch (690:3): [True: 1, False: 757]
  ------------------
  691|      1|    return "out of memory";
  692|    138|  case NETRC_SYNTAX_ERROR:
  ------------------
  |  Branch (692:3): [True: 138, False: 620]
  ------------------
  693|    138|    return "syntax error";
  694|    758|  }
  695|       |  /* never reached */
  696|    758|}
netrc.c:netrc_scan_file:
  548|    753|{
  549|    753|  struct dynbuf *filebuf = &store->filebuf;
  550|       |
  551|    753|  if(!store->loaded || strcmp(netrcfile, store->filename)) {
  ------------------
  |  Branch (551:6): [True: 753, False: 0]
  |  Branch (551:24): [True: 0, False: 0]
  ------------------
  552|    753|    NETRCcode ret;
  553|    753|    store->loaded = FALSE;
  ------------------
  |  | 1000|    753|#define FALSE false
  ------------------
  554|    753|    ret = file2memory(netrcfile, filebuf);
  555|    753|    if(ret) {
  ------------------
  |  Branch (555:8): [True: 7, False: 746]
  ------------------
  556|      7|      CURL_TRC_M(data, "[NETRC] could not load '%s'", netrcfile);
  ------------------
  |  |  148|      7|  do {                                   \
  |  |  149|      7|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      7|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      7|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|     14|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 7, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 7]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|     14|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      7|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      7|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      7|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 7]
  |  |  ------------------
  ------------------
  557|      7|      return ret;
  558|      7|    }
  559|    746|    curlx_free(store->filename);
  ------------------
  |  | 1428|    746|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  560|    746|    store->filename = curlx_strdup(netrcfile);
  ------------------
  |  | 1422|    746|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  561|    746|    if(!store->filename) {
  ------------------
  |  Branch (561:8): [True: 0, False: 746]
  ------------------
  562|      0|      curlx_dyn_reset(&store->filebuf);
  563|      0|      return NETRC_OUT_OF_MEMORY;
  564|      0|    }
  565|    746|    store->loaded = TRUE;
  ------------------
  |  |  997|    746|#define TRUE true
  ------------------
  566|    746|  }
  567|    746|  if(!curlx_dyn_len(filebuf))
  ------------------
  |  Branch (567:6): [True: 0, False: 746]
  ------------------
  568|      0|    return NETRC_NO_MATCH;
  569|       |
  570|    746|  return netrc_scan(data, curlx_dyn_ptr(filebuf), hostname, user, pcreds);
  571|    746|}
netrc.c:file2memory:
  504|    753|{
  505|    753|  NETRCcode ret = NETRC_FILE_MISSING; /* if it cannot open the file */
  506|    753|  FILE *file = curlx_fopen(filename, FOPEN_READTEXT);
  ------------------
  |  |   76|    753|#define curlx_fopen(file, mode) curl_dbg_fopen(file, mode, __LINE__, __FILE__)
  ------------------
  507|       |
  508|    753|  curlx_dyn_reset(filebuf);
  509|    753|  if(file) {
  ------------------
  |  Branch (509:6): [True: 753, False: 0]
  ------------------
  510|    753|    curlx_struct_stat stat;
  ------------------
  |  |   65|    753|#define curlx_struct_stat       struct stat
  ------------------
  511|    753|    if((curlx_fstat(fileno(file), &stat) == -1) || !S_ISDIR(stat.st_mode)) {
  ------------------
  |  |   64|    753|#define curlx_fstat             fstat
  ------------------
  |  Branch (511:8): [True: 0, False: 753]
  |  Branch (511:52): [True: 753, False: 0]
  ------------------
  512|    753|      CURLcode result = CURLE_OK;
  513|    753|      bool eof;
  514|    753|      struct dynbuf linebuf;
  515|    753|      curlx_dyn_init(&linebuf, MAX_NETRC_LINE);
  ------------------
  |  |   76|    753|#define MAX_NETRC_LINE  16384
  ------------------
  516|    753|      ret = NETRC_OK;
  517|  79.8k|      do {
  518|  79.8k|        const char *line;
  519|       |        /* Curl_get_line always returns lines ending with a newline */
  520|  79.8k|        result = Curl_get_line(&linebuf, file, &eof);
  521|  79.8k|        if(!result) {
  ------------------
  |  Branch (521:12): [True: 79.8k, False: 7]
  ------------------
  522|  79.8k|          line = curlx_dyn_ptr(&linebuf);
  523|       |          /* skip comments on load */
  524|  79.8k|          curlx_str_passblanks(&line);
  525|  79.8k|          if(*line == '#')
  ------------------
  |  Branch (525:14): [True: 202, False: 79.6k]
  ------------------
  526|    202|            continue;
  527|  79.6k|          result = curlx_dyn_add(filebuf, line);
  528|  79.6k|        }
  529|  79.6k|        if(result) {
  ------------------
  |  Branch (529:12): [True: 7, False: 79.6k]
  ------------------
  530|      7|          curlx_dyn_free(filebuf);
  531|      7|          ret = curl2netrc(result);
  ------------------
  |  |   84|      7|  ((!(r)) ? NETRC_OK : (((r) == CURLE_OUT_OF_MEMORY) ? \
  |  |  ------------------
  |  |  |  Branch (84:4): [True: 0, False: 7]
  |  |  |  Branch (84:25): [True: 0, False: 7]
  |  |  ------------------
  |  |   85|      7|   NETRC_OUT_OF_MEMORY : NETRC_SYNTAX_ERROR))
  ------------------
  532|      7|          break;
  533|      7|        }
  534|  79.8k|      } while(!eof);
  ------------------
  |  Branch (534:15): [True: 79.0k, False: 746]
  ------------------
  535|    753|      curlx_dyn_free(&linebuf);
  536|    753|    }
  537|    753|    curlx_fclose(file);
  ------------------
  |  |   81|    753|#define curlx_fclose(file)      curl_dbg_fclose(file, __LINE__, __FILE__)
  ------------------
  538|    753|  }
  539|    753|  return ret;
  540|    753|}
netrc.c:netrc_scan:
  428|    746|{
  429|    746|  struct netrc_scanner sc;
  430|    746|  NETRCcode rc = NETRC_OK;
  431|       |
  432|    746|  Curl_creds_unlink(pcreds);
  433|    746|  netrc_scan_init(&sc, data, content, hostname, user);
  434|       |
  435|  52.0k|  while(!rc && !sc.found) {
  ------------------
  |  Branch (435:9): [True: 51.9k, False: 130]
  |  Branch (435:16): [True: 51.9k, False: 0]
  ------------------
  436|  51.9k|    rc = netrc_lexer_next(&sc.lexer, FALSE);
  ------------------
  |  | 1000|  51.9k|#define FALSE false
  ------------------
  437|  51.9k|    if(!rc) {
  ------------------
  |  Branch (437:8): [True: 51.8k, False: 104]
  ------------------
  438|       |      /* Does this token end any previous entry? */
  439|  51.8k|      switch(sc.lexer.token) {
  440|    595|      case NETRC_TOK_EOF:
  ------------------
  |  Branch (440:7): [True: 595, False: 51.2k]
  ------------------
  441|  10.8k|      case NETRC_TOK_MACHINE:
  ------------------
  |  Branch (441:7): [True: 10.2k, False: 41.6k]
  ------------------
  442|  12.6k|      case NETRC_TOK_DEFAULT:
  ------------------
  |  Branch (442:7): [True: 1.80k, False: 50.0k]
  ------------------
  443|  12.8k|      case NETRC_TOK_MACDEF:
  ------------------
  |  Branch (443:7): [True: 254, False: 51.6k]
  ------------------
  444|  12.8k|        rc = netrc_scan_end_entry(&sc);
  445|  12.8k|        if(rc || sc.found)
  ------------------
  |  Branch (445:12): [True: 0, False: 12.8k]
  |  Branch (445:18): [True: 97, False: 12.7k]
  ------------------
  446|     97|          goto out;
  447|  12.7k|        break;
  448|  38.9k|      default:
  ------------------
  |  Branch (448:7): [True: 38.9k, False: 12.8k]
  ------------------
  449|  38.9k|        break;
  450|  51.8k|      }
  451|       |
  452|  51.7k|      switch(sc.lexer.token) {
  453|    519|      case NETRC_TOK_EOF:
  ------------------
  |  Branch (453:7): [True: 519, False: 51.2k]
  ------------------
  454|    519|        goto out;
  455|  10.2k|      case NETRC_TOK_MACHINE:
  ------------------
  |  Branch (455:7): [True: 10.2k, False: 41.5k]
  ------------------
  456|  10.2k|        rc = netrc_lexer_next(&sc.lexer, TRUE);
  ------------------
  |  |  997|  10.2k|#define TRUE true
  ------------------
  457|  10.2k|        if(!rc) {
  ------------------
  |  Branch (457:12): [True: 10.2k, False: 6]
  ------------------
  458|  10.2k|          if(sc.lexer.token == NETRC_TOK_LITERAL) {
  ------------------
  |  Branch (458:14): [True: 10.1k, False: 3]
  ------------------
  459|  10.1k|            sc.matches_host = curl_strequal(
  460|  10.1k|              sc.hostname, curlx_dyn_ptr(&sc.lexer.literal));
  461|  10.1k|          }
  462|      3|          else {
  463|      3|            sc.matches_host = FALSE;
  ------------------
  |  | 1000|      3|#define FALSE false
  ------------------
  464|      3|            netrc_lexer_push(&sc.lexer);
  465|      3|          }
  466|  10.2k|        }
  467|  10.2k|        break;
  468|  1.79k|      case NETRC_TOK_DEFAULT:
  ------------------
  |  Branch (468:7): [True: 1.79k, False: 49.9k]
  ------------------
  469|  1.79k|        sc.matches_host = TRUE;
  ------------------
  |  |  997|  1.79k|#define TRUE true
  ------------------
  470|  1.79k|        break;
  471|  3.06k|      case NETRC_TOK_ACCOUNT:
  ------------------
  |  Branch (471:7): [True: 3.06k, False: 48.7k]
  ------------------
  472|  3.06k|        rc = netrc_scan_literal(&sc, NULL); /* ignore, not used */
  473|  3.06k|        break;
  474|  5.47k|      case NETRC_TOK_LOGIN:
  ------------------
  |  Branch (474:7): [True: 5.47k, False: 46.2k]
  ------------------
  475|  5.47k|        rc = netrc_scan_literal(&sc, &sc.login);
  476|  5.47k|        break;
  477|  2.09k|      case NETRC_TOK_PASSWD:
  ------------------
  |  Branch (477:7): [True: 2.09k, False: 49.6k]
  ------------------
  478|  2.09k|        rc = netrc_scan_literal(&sc, &sc.passwd);
  479|  2.09k|        break;
  480|    251|      case NETRC_TOK_MACDEF:
  ------------------
  |  Branch (480:7): [True: 251, False: 51.5k]
  ------------------
  481|    251|        netrc_skip_to_empty_line(&sc.lexer);
  482|    251|        break;
  483|  2.42k|      case NETRC_TOK_LITERAL:
  ------------------
  |  Branch (483:7): [True: 2.42k, False: 49.3k]
  ------------------
  484|  28.3k|      case NETRC_TOK_JUNK:
  ------------------
  |  Branch (484:7): [True: 25.9k, False: 25.8k]
  ------------------
  485|  28.3k|      default:
  ------------------
  |  Branch (485:7): [True: 0, False: 51.7k]
  ------------------
  486|       |        /* skip this */
  487|  28.3k|        break;
  488|  51.7k|      }
  489|  51.7k|    }
  490|  51.9k|  }
  491|       |
  492|    746|out:
  493|    746|  if(!rc) {
  ------------------
  |  Branch (493:6): [True: 616, False: 130]
  ------------------
  494|    616|    if(sc.creds)
  ------------------
  |  Branch (494:8): [True: 97, False: 519]
  ------------------
  495|     97|      Curl_creds_link(pcreds, sc.creds);
  496|    519|    else
  497|    519|      rc = NETRC_NO_MATCH;
  498|    616|  }
  499|    746|  netrc_scan_cleanup(&sc);
  500|    746|  return rc;
  501|    746|}
netrc.c:netrc_scan_init:
  345|    746|{
  346|    746|  memset(sc, 0, sizeof(*sc));
  347|    746|  netrc_lexer_init(&sc->lexer, data, content);
  348|    746|  sc->hostname = hostname;
  349|    746|  sc->user = (user && user[0]) ? user : NULL;
  ------------------
  |  Branch (349:15): [True: 289, False: 457]
  |  Branch (349:23): [True: 289, False: 0]
  ------------------
  350|    746|  netrc_scan_reset(sc);
  351|    746|}
netrc.c:netrc_lexer_init:
  139|    746|{
  140|    746|  curlx_dyn_init(&lexer->literal, MAX_NETRC_TOKEN);
  ------------------
  |  |   78|    746|#define MAX_NETRC_TOKEN 4096
  ------------------
  141|    746|  lexer->data = data;
  142|    746|  lexer->content = lexer->pos = content;
  143|    746|}
netrc.c:netrc_scan_reset:
  334|  14.3k|{
  335|  14.3k|  curlx_safefree(sc->login);
  ------------------
  |  | 1284|  14.3k|  do {                      \
  |  | 1285|  14.3k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1428|  14.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1286|  14.3k|    (ptr) = NULL;           \
  |  | 1287|  14.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1287:11): [Folded, False: 14.3k]
  |  |  ------------------
  ------------------
  336|  14.3k|  curlx_safefree(sc->passwd);
  ------------------
  |  | 1284|  14.3k|  do {                      \
  |  | 1285|  14.3k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1428|  14.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1286|  14.3k|    (ptr) = NULL;           \
  |  | 1287|  14.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1287:11): [Folded, False: 14.3k]
  |  |  ------------------
  ------------------
  337|       |  sc->matches_host = FALSE;
  ------------------
  |  | 1000|  14.3k|#define FALSE false
  ------------------
  338|  14.3k|}
netrc.c:netrc_lexer_next:
  250|  72.8k|{
  251|  72.8k|  const char *s = lexer->pos, *start;
  252|  72.8k|  NETRCcode rc = NETRC_OK;
  253|  72.8k|  size_t slen;
  254|  72.8k|  CURLcode result;
  255|       |
  256|  72.8k|  if(lexer->pushed) {
  ------------------
  |  Branch (256:6): [True: 16, False: 72.7k]
  ------------------
  257|     16|    lexer->pushed = FALSE;
  ------------------
  |  | 1000|     16|#define FALSE false
  ------------------
  258|     16|    goto out;
  259|     16|  }
  260|       |
  261|  72.7k|  curlx_dyn_reset(&lexer->literal);
  262|  72.7k|  netrc_skip_blanks(lexer);
  263|  72.7k|  s = lexer->pos;
  264|       |
  265|  72.7k|  switch(*s) {
  266|    595|  case 0:
  ------------------
  |  Branch (266:3): [True: 595, False: 72.2k]
  ------------------
  267|    595|    lexer->token = NETRC_TOK_EOF;
  268|    595|    break;
  269|  9.08k|  case '\"':
  ------------------
  |  Branch (269:3): [True: 9.08k, False: 63.7k]
  ------------------
  270|  9.08k|    rc = netrc_lexer_quoted(lexer);
  271|  9.08k|    lexer->token = NETRC_TOK_LITERAL;
  272|  9.08k|    s = lexer->pos;
  273|  9.08k|    break;
  274|  63.1k|  default:
  ------------------
  |  Branch (274:3): [True: 63.1k, False: 9.67k]
  ------------------
  275|       |    /* unquoted token */
  276|  63.1k|    start = s;
  277|  1.22M|    while(*s && !ISBLANK(*s) && !ISNEWLINE(*s))
  ------------------
  |  |   43|  2.44M|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (43:22): [True: 45.9k, False: 1.17M]
  |  |  |  Branch (43:38): [True: 1.83k, False: 1.17M]
  |  |  ------------------
  ------------------
                  while(*s && !ISBLANK(*s) && !ISNEWLINE(*s))
  ------------------
  |  |   48|  1.17M|#define ISNEWLINE(x)    (((x) == '\n') || (x) == '\r')
  |  |  ------------------
  |  |  |  Branch (48:26): [True: 13.5k, False: 1.16M]
  |  |  |  Branch (48:43): [True: 1.75k, False: 1.15M]
  |  |  ------------------
  ------------------
  |  Branch (277:11): [True: 1.22M, False: 0]
  ------------------
  278|  1.15M|      ++s;
  279|  63.1k|    slen = s - start;
  280|  63.1k|    if(!slen) {
  ------------------
  |  Branch (280:8): [True: 556, False: 62.5k]
  ------------------
  281|    556|      rc = NETRC_SYNTAX_ERROR;
  282|    556|    }
  283|  63.1k|    if(want_literal) {
  ------------------
  |  Branch (283:8): [True: 14.2k, False: 48.8k]
  ------------------
  284|  14.2k|      lexer->token = NETRC_TOK_LITERAL;
  285|  14.2k|      result = curlx_dyn_addn(&lexer->literal, start, slen);
  286|  14.2k|      rc = curl2netrc(result);
  ------------------
  |  |   84|  14.2k|  ((!(r)) ? NETRC_OK : (((r) == CURLE_OUT_OF_MEMORY) ? \
  |  |  ------------------
  |  |  |  Branch (84:4): [True: 14.2k, False: 15]
  |  |  |  Branch (84:25): [True: 0, False: 15]
  |  |  ------------------
  |  |   85|     15|   NETRC_OUT_OF_MEMORY : NETRC_SYNTAX_ERROR))
  ------------------
  287|  14.2k|    }
  288|  48.8k|    else if((slen == 7) && curl_strnequal(start, "machine", slen)) {
  ------------------
  |  Branch (288:13): [True: 16.7k, False: 32.1k]
  |  Branch (288:28): [True: 10.2k, False: 6.50k]
  ------------------
  289|  10.2k|      lexer->token = NETRC_TOK_MACHINE;
  290|  10.2k|    }
  291|  38.6k|    else if((slen == 7) && curl_strnequal(start, "default", slen)) {
  ------------------
  |  Branch (291:13): [True: 6.50k, False: 32.1k]
  |  Branch (291:28): [True: 1.80k, False: 4.70k]
  ------------------
  292|  1.80k|      lexer->token = NETRC_TOK_DEFAULT;
  293|  1.80k|    }
  294|  36.8k|    else if((slen == 7) && curl_strnequal(start, "account", slen)) {
  ------------------
  |  Branch (294:13): [True: 4.70k, False: 32.1k]
  |  Branch (294:28): [True: 3.06k, False: 1.63k]
  ------------------
  295|  3.06k|      lexer->token = NETRC_TOK_ACCOUNT;
  296|  3.06k|    }
  297|  33.7k|    else if((slen == 5) && curl_strnequal(start, "login", slen)) {
  ------------------
  |  Branch (297:13): [True: 9.86k, False: 23.9k]
  |  Branch (297:28): [True: 5.47k, False: 4.39k]
  ------------------
  298|  5.47k|      lexer->token = NETRC_TOK_LOGIN;
  299|  5.47k|    }
  300|  28.2k|    else if((slen == 8) && curl_strnequal(start, "password", slen)) {
  ------------------
  |  Branch (300:13): [True: 4.03k, False: 24.2k]
  |  Branch (300:28): [True: 2.09k, False: 1.93k]
  ------------------
  301|  2.09k|      lexer->token = NETRC_TOK_PASSWD;
  302|  2.09k|    }
  303|  26.1k|    else if((slen == 6) && curl_strnequal(start, "macdef", slen)) {
  ------------------
  |  Branch (303:13): [True: 1.97k, False: 24.2k]
  |  Branch (303:28): [True: 254, False: 1.72k]
  ------------------
  304|    254|      lexer->token = NETRC_TOK_MACDEF;
  305|    254|    }
  306|  25.9k|    else {
  307|  25.9k|      lexer->token = NETRC_TOK_JUNK;
  308|  25.9k|    }
  309|  63.1k|    break;
  310|  72.7k|  }
  311|       |
  312|  72.8k|out:
  313|       |#if NETRC_DEBUG
  314|       |  CURL_TRC_M(lexer->data, "[NETRC] token %s '%s', rc=%d",
  315|       |             netrc_tokenstr(lexer->token),
  316|       |             curlx_dyn_ptr(&lexer->literal), rc);
  317|       |#endif
  318|  72.8k|  lexer->pos = s;
  319|  72.8k|  return rc;
  320|  72.7k|}
netrc.c:netrc_skip_blanks:
  153|  72.7k|{
  154|  72.7k|  const char *s = lexer->pos;
  155|  95.0k|  while(*s) {
  ------------------
  |  Branch (155:9): [True: 94.4k, False: 595]
  ------------------
  156|  94.4k|    curlx_str_passblanks(&s);
  157|  96.9k|    while(*s == '\r')
  ------------------
  |  Branch (157:11): [True: 2.56k, False: 94.4k]
  ------------------
  158|  2.56k|      ++s;
  159|  94.4k|    if(*s == '\n') {
  ------------------
  |  Branch (159:8): [True: 22.2k, False: 72.2k]
  ------------------
  160|  22.2k|      ++s;
  161|  22.2k|    }
  162|  72.2k|    else
  163|  72.2k|      break;
  164|  94.4k|  }
  165|  72.7k|  lexer->pos = s;
  166|  72.7k|}
netrc.c:netrc_lexer_quoted:
  195|  9.08k|{
  196|  9.08k|  NETRCcode rc = NETRC_SYNTAX_ERROR;
  197|  9.08k|  const char *s = lexer->pos;
  198|  9.08k|  bool escape = FALSE;
  ------------------
  |  | 1000|  9.08k|#define FALSE false
  ------------------
  199|  9.08k|  CURLcode result;
  200|       |
  201|  9.08k|  DEBUGASSERT(*s == '\"');
  ------------------
  |  | 1027|  9.08k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (201:3): [True: 0, False: 9.08k]
  |  Branch (201:3): [True: 9.08k, False: 0]
  ------------------
  202|  9.08k|  ++s; /* pass the leading quote */
  203|   114k|  while(*s) {
  ------------------
  |  Branch (203:9): [True: 114k, False: 103]
  ------------------
  204|   114k|    char c = *s;
  205|   114k|    if(escape) {
  ------------------
  |  Branch (205:8): [True: 1.88k, False: 112k]
  ------------------
  206|  1.88k|      escape = FALSE;
  ------------------
  |  | 1000|  1.88k|#define FALSE false
  ------------------
  207|  1.88k|      switch(c) {
  ------------------
  |  Branch (207:14): [True: 1.42k, False: 456]
  ------------------
  208|    338|      case 'n':
  ------------------
  |  Branch (208:7): [True: 338, False: 1.54k]
  ------------------
  209|    338|        c = '\n';
  210|    338|        break;
  211|    359|      case 'r':
  ------------------
  |  Branch (211:7): [True: 359, False: 1.52k]
  ------------------
  212|    359|        c = '\r';
  213|    359|        break;
  214|    732|      case 't':
  ------------------
  |  Branch (214:7): [True: 732, False: 1.15k]
  ------------------
  215|    732|        c = '\t';
  216|    732|        break;
  217|  1.88k|      }
  218|  1.88k|    }
  219|   112k|    else if(c == '\\') {
  ------------------
  |  Branch (219:13): [True: 1.88k, False: 110k]
  ------------------
  220|  1.88k|      escape = TRUE;
  ------------------
  |  |  997|  1.88k|#define TRUE true
  ------------------
  221|  1.88k|      ++s;
  222|  1.88k|      continue;
  223|  1.88k|    }
  224|   110k|    else if(c == '\"') {
  ------------------
  |  Branch (224:13): [True: 8.97k, False: 101k]
  ------------------
  225|  8.97k|      ++s; /* pass the ending quote */
  226|       |      /* Ensure even an empty literal has a terminating NUL. */
  227|  8.97k|      result = curlx_dyn_addn(&lexer->literal, "", 0);
  228|  8.97k|      rc = curl2netrc(result);
  ------------------
  |  |   84|  8.97k|  ((!(r)) ? NETRC_OK : (((r) == CURLE_OUT_OF_MEMORY) ? \
  |  |  ------------------
  |  |  |  Branch (84:4): [True: 8.97k, False: 0]
  |  |  |  Branch (84:25): [True: 0, False: 0]
  |  |  ------------------
  |  |   85|      0|   NETRC_OUT_OF_MEMORY : NETRC_SYNTAX_ERROR))
  ------------------
  229|  8.97k|      goto out;
  230|  8.97k|    }
  231|   103k|    result = curlx_dyn_addn(&lexer->literal, &c, 1);
  232|   103k|    if(result) {
  ------------------
  |  Branch (232:8): [True: 4, False: 103k]
  ------------------
  233|      4|      rc = curl2netrc(result);
  ------------------
  |  |   84|      4|  ((!(r)) ? NETRC_OK : (((r) == CURLE_OUT_OF_MEMORY) ? \
  |  |  ------------------
  |  |  |  Branch (84:4): [True: 0, False: 4]
  |  |  |  Branch (84:25): [True: 0, False: 4]
  |  |  ------------------
  |  |   85|      4|   NETRC_OUT_OF_MEMORY : NETRC_SYNTAX_ERROR))
  ------------------
  234|      4|      goto out;
  235|      4|    }
  236|   103k|    ++s;
  237|   103k|  }
  238|  9.08k|out:
  239|  9.08k|  lexer->pos = s;
  240|  9.08k|  return rc;
  241|  9.08k|}
netrc.c:netrc_scan_end_entry:
  382|  12.8k|{
  383|  12.8k|  NETRCcode rc = NETRC_OK;
  384|       |#if NETRC_DEBUG
  385|       |  CURL_TRC_M(sc->lexer.data,
  386|       |             "[NETRC] entry matches_host=%d, login='%s', passwd='%s'",
  387|       |             sc->matches_host, sc->login, sc->passwd);
  388|       |#endif
  389|  12.8k|  if(sc->matches_host) {
  ------------------
  |  Branch (389:6): [True: 2.50k, False: 10.3k]
  ------------------
  390|  2.50k|    if(sc->login) {
  ------------------
  |  Branch (390:8): [True: 1.41k, False: 1.09k]
  ------------------
  391|  1.41k|      if(sc->user) {
  ------------------
  |  Branch (391:10): [True: 1.34k, False: 62]
  ------------------
  392|  1.34k|        if(Curl_timestrcmp(sc->user, sc->login))
  ------------------
  |  Branch (392:12): [True: 1.13k, False: 213]
  ------------------
  393|  1.13k|          goto out;
  394|       |        /* We look for a specific user,
  395|       |         * entry is only interesting with password */
  396|    213|        sc->found = !!sc->passwd;
  397|    213|      }
  398|     62|      else {
  399|     62|        sc->found = TRUE;
  ------------------
  |  |  997|     62|#define TRUE true
  ------------------
  400|     62|      }
  401|  1.41k|    }
  402|  1.09k|    else if(sc->passwd) {
  ------------------
  |  Branch (402:13): [True: 34, False: 1.06k]
  ------------------
  403|       |      /* found a passwd that applies to any user */
  404|     34|      sc->found = TRUE;
  ------------------
  |  |  997|     34|#define TRUE true
  ------------------
  405|     34|    }
  406|  1.06k|    else {
  407|       |      /* entry has nothing interesting */
  408|  1.06k|    }
  409|  1.37k|    if(sc->found) {
  ------------------
  |  Branch (409:8): [True: 97, False: 1.27k]
  ------------------
  410|       |#if NETRC_DEBUG
  411|       |      CURL_TRC_M(sc->lexer.data, "[NETRC] entry match found");
  412|       |#endif
  413|     97|      if(Curl_creds_create(sc->user ? sc->user : sc->login, sc->passwd,
  ------------------
  |  Branch (413:10): [True: 0, False: 97]
  |  Branch (413:28): [True: 14, False: 83]
  ------------------
  414|     97|                           NULL, NULL, NULL, CREDS_NETRC, &sc->creds))
  ------------------
  |  |   32|     97|#define CREDS_NETRC  3 /* username/passwd found in netrc */
  ------------------
  415|      0|        rc = NETRC_OUT_OF_MEMORY;
  416|     97|    }
  417|  1.37k|  }
  418|  12.8k|out:
  419|  12.8k|  netrc_scan_reset(sc);
  420|  12.8k|  return rc;
  421|  12.8k|}
netrc.c:netrc_lexer_push:
  244|     16|{
  245|       |  lexer->pushed = TRUE;
  ------------------
  |  |  997|     16|#define TRUE true
  ------------------
  246|     16|}
netrc.c:netrc_scan_literal:
  364|  10.6k|{
  365|  10.6k|  NETRCcode rc = netrc_lexer_next(&sc->lexer, TRUE);
  ------------------
  |  |  997|  10.6k|#define TRUE true
  ------------------
  366|  10.6k|  if(!rc) {
  ------------------
  |  Branch (366:6): [True: 10.6k, False: 20]
  ------------------
  367|  10.6k|    if(sc->lexer.token == NETRC_TOK_LITERAL) {
  ------------------
  |  Branch (367:8): [True: 10.6k, False: 13]
  ------------------
  368|  10.6k|      if(pdest && sc->matches_host) {
  ------------------
  |  Branch (368:10): [True: 7.54k, False: 3.05k]
  |  Branch (368:19): [True: 5.64k, False: 1.89k]
  ------------------
  369|  5.64k|        curlx_free(*pdest);
  ------------------
  |  | 1428|  5.64k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  370|  5.64k|        *pdest = curlx_strdup(curlx_dyn_ptr(&sc->lexer.literal));
  ------------------
  |  | 1422|  5.64k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  371|  5.64k|        if(!*pdest)
  ------------------
  |  Branch (371:12): [True: 0, False: 5.64k]
  ------------------
  372|      0|          rc = NETRC_OUT_OF_MEMORY;
  373|  5.64k|      }
  374|  10.6k|    }
  375|     13|    else
  376|     13|      netrc_lexer_push(&sc->lexer);
  377|  10.6k|  }
  378|  10.6k|  return rc;
  379|  10.6k|}
netrc.c:netrc_skip_to_empty_line:
  169|    251|{
  170|    251|  const char *s = lexer->pos;
  171|  5.31k|  while(*s) {
  ------------------
  |  Branch (171:9): [True: 5.27k, False: 42]
  ------------------
  172|  5.27k|    if(*s == '\r')
  ------------------
  |  Branch (172:8): [True: 233, False: 5.04k]
  ------------------
  173|    233|      ++s;
  174|  5.04k|    else if(*s == '\n') {
  ------------------
  |  Branch (174:13): [True: 516, False: 4.52k]
  ------------------
  175|    516|      ++s;
  176|    713|      while(*s == '\r')
  ------------------
  |  Branch (176:13): [True: 197, False: 516]
  ------------------
  177|    197|        ++s;
  178|    516|      if(*s == '\n')
  ------------------
  |  Branch (178:10): [True: 209, False: 307]
  ------------------
  179|    209|        goto out;
  180|    516|    }
  181|  4.52k|    else
  182|  4.52k|      ++s;
  183|  5.27k|  }
  184|    251|out:
  185|    251|  lexer->pos = s;
  186|    251|}
netrc.c:netrc_scan_cleanup:
  354|    746|{
  355|    746|  netrc_scan_reset(sc);
  356|    746|  sc->hostname = NULL;
  357|       |  sc->user = NULL;
  358|    746|  Curl_creds_unlink(&sc->creds);
  359|    746|  netrc_lexer_cleanup(&sc->lexer);
  360|    746|}
netrc.c:netrc_lexer_cleanup:
  146|    746|{
  147|    746|  lexer->content = lexer->pos = NULL;
  148|       |  lexer->data = NULL;
  149|    746|  curlx_dyn_free(&lexer->literal);
  150|    746|}

Curl_peer_unlink:
  307|  3.01k|{
  308|  3.01k|  if(*ppeer) {
  ------------------
  |  Branch (308:6): [True: 0, False: 3.01k]
  ------------------
  309|      0|    struct Curl_peer *peer = *ppeer;
  310|       |
  311|      0|    DEBUGASSERT(peer->refcount);
  ------------------
  |  | 1027|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (311:5): [True: 0, False: 0]
  |  Branch (311:5): [True: 0, False: 0]
  ------------------
  312|      0|    *ppeer = NULL;
  313|      0|    if(peer->refcount)
  ------------------
  |  Branch (313:8): [True: 0, False: 0]
  ------------------
  314|      0|      peer->refcount--;
  315|      0|    if(!peer->refcount) {
  ------------------
  |  Branch (315:8): [True: 0, False: 0]
  ------------------
  316|      0|      curlx_free(peer);
  ------------------
  |  | 1428|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  317|      0|    }
  318|      0|  }
  319|  3.01k|}

Curl_req_init:
   38|    753|{
   39|    753|  memset(req, 0, sizeof(*req));
   40|    753|}
Curl_req_free:
  175|    753|{
  176|    753|  curlx_safefree(req->newurl);
  ------------------
  |  | 1284|    753|  do {                      \
  |  | 1285|    753|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1428|    753|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1286|    753|    (ptr) = NULL;           \
  |  | 1287|    753|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1287:11): [Folded, False: 753]
  |  |  ------------------
  ------------------
  177|    753|  curlx_safefree(req->hd_auth);
  ------------------
  |  | 1284|    753|  do {                      \
  |  | 1285|    753|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1428|    753|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1286|    753|    (ptr) = NULL;           \
  |  | 1287|    753|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1287:11): [Folded, False: 753]
  |  |  ------------------
  ------------------
  178|    753|#ifndef CURL_DISABLE_PROXY
  179|    753|  curlx_safefree(req->hd_proxy_auth);
  ------------------
  |  | 1284|    753|  do {                      \
  |  | 1285|    753|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1428|    753|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1286|    753|    (ptr) = NULL;           \
  |  | 1287|    753|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1287:11): [Folded, False: 753]
  |  |  ------------------
  ------------------
  180|    753|#endif
  181|    753|  if(req->sendbuf_init)
  ------------------
  |  Branch (181:6): [True: 0, False: 753]
  ------------------
  182|      0|    Curl_bufq_free(&req->sendbuf);
  183|    753|  Curl_client_cleanup(data);
  184|    753|}

Curl_client_cleanup:
   72|    753|{
   73|    753|  cl_reset_reader(data);
   74|    753|  cl_reset_writer(data);
   75|       |
   76|    753|  data->req.bytecount = 0;
   77|    753|  data->req.headerline = 0;
   78|    753|}
sendf.c:cl_reset_reader:
   60|    753|{
   61|    753|  struct Curl_creader *reader = data->req.reader.stack;
   62|    753|  data->req.reader_started = FALSE;
  ------------------
  |  | 1000|    753|#define FALSE false
  ------------------
   63|    753|  while(reader) {
  ------------------
  |  Branch (63:9): [True: 0, False: 753]
  ------------------
   64|      0|    data->req.reader.stack = reader->next;
   65|      0|    reader->crt->do_close(data, reader);
   66|      0|    curlx_free(reader);
  ------------------
  |  | 1428|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   67|      0|    reader = data->req.reader.stack;
   68|      0|  }
   69|    753|}
sendf.c:cl_reset_writer:
   48|    753|{
   49|    753|  struct Curl_cwriter *writer = data->req.writer.stack;
   50|    753|  while(writer) {
  ------------------
  |  Branch (50:9): [True: 0, False: 753]
  ------------------
   51|      0|    data->req.writer.stack = writer->next;
   52|      0|    writer->cwt->do_close(data, writer);
   53|      0|    curlx_free(writer);
  ------------------
  |  | 1428|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   54|      0|    writer = data->req.writer.stack;
   55|      0|  }
   56|       |  data->req.writer.paused = FALSE;
  ------------------
  |  | 1000|    753|#define FALSE false
  ------------------
   57|    753|}

Curl_setopt_SSLVERSION:
  309|  1.50k|{
  310|       |  /*
  311|       |   * Set explicit SSL version to try to connect with, as some SSL
  312|       |   * implementations are lame.
  313|       |   */
  314|  1.50k|  {
  315|  1.50k|    long version, version_max;
  316|  1.50k|    struct ssl_easy_config *sslc = &data->set.ssl;
  317|  1.50k|#ifndef CURL_DISABLE_PROXY
  318|  1.50k|    if(option != CURLOPT_SSLVERSION)
  ------------------
  |  Branch (318:8): [True: 753, False: 753]
  ------------------
  319|    753|      sslc = &data->set.proxy_ssl;
  320|       |#else
  321|       |    (void)option; /* unused */
  322|       |#endif
  323|  1.50k|    version = C_SSLVERSION_VALUE(arg);
  ------------------
  |  |  186|  1.50k|#define C_SSLVERSION_VALUE(x)     ((x) & 0xffff)
  ------------------
  324|  1.50k|    version_max = (long)C_SSLVERSION_MAX_VALUE(arg);
  ------------------
  |  |  187|  1.50k|#define C_SSLVERSION_MAX_VALUE(x) ((unsigned long)(x) & 0xffff0000)
  ------------------
  325|       |
  326|  1.50k|    if(version < CURL_SSLVERSION_DEFAULT ||
  ------------------
  |  | 2394|  3.01k|#define CURL_SSLVERSION_DEFAULT 0L
  ------------------
  |  Branch (326:8): [True: 0, False: 1.50k]
  ------------------
  327|  1.50k|       version == CURL_SSLVERSION_SSLv2 ||
  ------------------
  |  | 2396|  3.01k|#define CURL_SSLVERSION_SSLv2   2L
  ------------------
  |  Branch (327:8): [True: 0, False: 1.50k]
  ------------------
  328|  1.50k|       version == CURL_SSLVERSION_SSLv3 ||
  ------------------
  |  | 2397|  3.01k|#define CURL_SSLVERSION_SSLv3   3L
  ------------------
  |  Branch (328:8): [True: 0, False: 1.50k]
  ------------------
  329|  1.50k|       version >= CURL_SSLVERSION_LAST ||
  ------------------
  |  | 2403|  3.01k|#define CURL_SSLVERSION_LAST    8L /* never use, keep last */
  ------------------
  |  Branch (329:8): [True: 0, False: 1.50k]
  ------------------
  330|  1.50k|       version_max < CURL_SSLVERSION_MAX_NONE ||
  ------------------
  |  | 2405|  3.01k|#define CURL_SSLVERSION_MAX_NONE 0L
  ------------------
  |  Branch (330:8): [True: 0, False: 1.50k]
  ------------------
  331|  1.50k|       version_max >= CURL_SSLVERSION_MAX_LAST)
  ------------------
  |  | 2413|  1.50k|#define CURL_SSLVERSION_MAX_LAST    (CURL_SSLVERSION_LAST    << 16)
  |  |  ------------------
  |  |  |  | 2403|  1.50k|#define CURL_SSLVERSION_LAST    8L /* never use, keep last */
  |  |  ------------------
  ------------------
  |  Branch (331:8): [True: 0, False: 1.50k]
  ------------------
  332|      0|      return CURLE_BAD_FUNCTION_ARGUMENT;
  333|  1.50k|    if(version == CURL_SSLVERSION_DEFAULT)
  ------------------
  |  | 2394|  1.50k|#define CURL_SSLVERSION_DEFAULT 0L
  ------------------
  |  Branch (333:8): [True: 1.50k, False: 0]
  ------------------
  334|  1.50k|      version = CURL_SSLVERSION_TLSv1_2;
  ------------------
  |  | 2400|  1.50k|#define CURL_SSLVERSION_TLSv1_2 6L
  ------------------
  335|       |
  336|  1.50k|    sslc->version = (unsigned char)version;
  337|  1.50k|    sslc->version_max = (unsigned int)version_max;
  338|  1.50k|  }
  339|      0|  return CURLE_OK;
  340|  1.50k|}

easy.c:sigpipe_ignore:
   49|    753|{
   50|       |  /* get a local copy of no_signal because the Curl_easy might not be
   51|       |     around when we restore */
   52|    753|  ig->no_signal = data->set.no_signal;
   53|    753|  if(!data->set.no_signal) {
  ------------------
  |  Branch (53:6): [True: 753, False: 0]
  ------------------
   54|    753|    struct sigaction action;
   55|       |    /* first, extract the existing situation */
   56|    753|    sigaction(SIGPIPE, NULL, &ig->old_pipe_act);
   57|    753|    action = ig->old_pipe_act;
   58|       |    /* ignore this signal */
   59|    753|    action.sa_handler = SIG_IGN;
   60|    753|#ifdef SA_SIGINFO
   61|       |    /* clear SA_SIGINFO flag since we are using sa_handler */
   62|    753|    action.sa_flags &= ~SA_SIGINFO;
   63|    753|#endif
   64|    753|    sigaction(SIGPIPE, &action, NULL);
   65|    753|  }
   66|    753|}
easy.c:sigpipe_restore:
   74|    753|{
   75|    753|  if(!ig->no_signal)
  ------------------
  |  Branch (75:6): [True: 753, False: 0]
  ------------------
   76|       |    /* restore the outside state */
   77|    753|    sigaction(SIGPIPE, &ig->old_pipe_act, NULL);
   78|    753|}

curl_slist_free_all:
  125|  1.50k|{
  126|  1.50k|  struct curl_slist *next;
  127|  1.50k|  struct curl_slist *item;
  128|       |
  129|  1.50k|  if(!list)
  ------------------
  |  Branch (129:6): [True: 1.50k, False: 0]
  ------------------
  130|  1.50k|    return;
  131|       |
  132|      0|  item = list;
  133|      0|  do {
  134|      0|    next = item->next;
  135|      0|    curlx_safefree(item->data);
  ------------------
  |  | 1284|      0|  do {                      \
  |  | 1285|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1428|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1286|      0|    (ptr) = NULL;           \
  |  | 1287|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1287:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  136|      0|    curlx_free(item);
  ------------------
  |  | 1428|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  137|      0|    item = next;
  138|      0|  } while(next);
  ------------------
  |  Branch (138:11): [True: 0, False: 0]
  ------------------
  139|      0|}

Curl_timestrcmp:
  117|  1.34k|{
  118|  1.34k|  int match = 0;
  119|  1.34k|  int i = 0;
  120|       |
  121|  1.34k|  if(a && b) {
  ------------------
  |  Branch (121:6): [True: 1.34k, False: 0]
  |  Branch (121:11): [True: 1.34k, False: 0]
  ------------------
  122|  11.1k|    while(1) {
  ------------------
  |  Branch (122:11): [True: 11.1k, Folded]
  ------------------
  123|  11.1k|      match |= a[i] ^ b[i];
  124|  11.1k|      if(!a[i] || !b[i])
  ------------------
  |  Branch (124:10): [True: 894, False: 10.2k]
  |  Branch (124:19): [True: 454, False: 9.84k]
  ------------------
  125|  1.34k|        break;
  126|  9.84k|      i++;
  127|  9.84k|    }
  128|  1.34k|  }
  129|      0|  else
  130|      0|    return a || b;
  ------------------
  |  Branch (130:12): [True: 0, False: 0]
  |  Branch (130:17): [True: 0, False: 0]
  ------------------
  131|  1.34k|  return match;
  132|  1.34k|}

strequal.c:Curl_raw_toupper:
   38|   405k|{
   39|   405k|  return (char)Curl_touppermap[(unsigned char)in];
   40|   405k|}

curl_strequal:
   77|  10.1k|{
   78|  10.1k|  if(s1 && s2)
  ------------------
  |  Branch (78:6): [True: 10.1k, False: 0]
  |  Branch (78:12): [True: 10.1k, False: 0]
  ------------------
   79|       |    /* both pointers point to something then compare them */
   80|  10.1k|    return casecompare(s1, s2);
   81|       |
   82|       |  /* if both pointers are NULL then treat them as equal */
   83|      0|  return NULL == s1 && NULL == s2;
  ------------------
  |  Branch (83:10): [True: 0, False: 0]
  |  Branch (83:24): [True: 0, False: 0]
  ------------------
   84|  10.1k|}
curl_strnequal:
   88|  43.8k|{
   89|  43.8k|  if(s1 && s2)
  ------------------
  |  Branch (89:6): [True: 43.8k, False: 0]
  |  Branch (89:12): [True: 43.8k, False: 0]
  ------------------
   90|       |    /* both pointers point to something then compare them */
   91|  43.8k|    return ncasecompare(s1, s2, n);
   92|       |
   93|       |  /* if both pointers are NULL then treat them as equal if max is non-zero */
   94|      0|  return NULL == s1 && NULL == s2 && n;
  ------------------
  |  Branch (94:10): [True: 0, False: 0]
  |  Branch (94:24): [True: 0, False: 0]
  |  Branch (94:38): [True: 0, False: 0]
  ------------------
   95|  43.8k|}
strequal.c:casecompare:
   36|  10.1k|{
   37|  27.4k|  while(*first) {
  ------------------
  |  Branch (37:9): [True: 26.1k, False: 1.32k]
  ------------------
   38|  26.1k|    if(Curl_raw_toupper(*first) != Curl_raw_toupper(*second))
  ------------------
  |  Branch (38:8): [True: 8.87k, False: 17.2k]
  ------------------
   39|       |      /* get out of the loop as soon as they do not match */
   40|  8.87k|      return 0;
   41|  17.2k|    first++;
   42|  17.2k|    second++;
   43|  17.2k|  }
   44|       |  /* If we are here either the strings are the same or the length is different.
   45|       |     We can test if the "current" character is non-zero for one and zero
   46|       |     for the other. Note that the characters may not be exactly the same even
   47|       |     if they match, we only want to compare zero-ness. */
   48|  1.32k|  return !*first == !*second;
   49|  10.1k|}
strequal.c:ncasecompare:
   52|  43.8k|{
   53|   199k|  while(*first && max) {
  ------------------
  |  Branch (53:9): [True: 199k, False: 0]
  |  Branch (53:19): [True: 176k, False: 22.9k]
  ------------------
   54|   176k|    if(Curl_raw_toupper(*first) != Curl_raw_toupper(*second))
  ------------------
  |  Branch (54:8): [True: 20.8k, False: 155k]
  ------------------
   55|  20.8k|      return 0;
   56|   155k|    max--;
   57|   155k|    first++;
   58|   155k|    second++;
   59|   155k|  }
   60|  22.9k|  if(max == 0)
  ------------------
  |  Branch (60:6): [True: 22.9k, False: 0]
  ------------------
   61|  22.9k|    return 1; /* they are equal this far */
   62|       |
   63|      0|  return Curl_raw_toupper(*first) == Curl_raw_toupper(*second);
   64|  22.9k|}

Curl_u8_strset_init:
   75|  2.25k|{
   76|       |#if defined(__GNUC__) && __GNUC__ >= 13
   77|       |#pragma GCC diagnostic push
   78|       |#pragma GCC diagnostic ignored "-Warray-bounds"
   79|       |#endif
   80|  2.25k|  memset(set, 0, sizeof(*set));
   81|       |#if defined(__GNUC__) && __GNUC__ >= 13
   82|       |#pragma GCC diagnostic pop
   83|       |#endif
   84|  2.25k|  set->data = set->sdata;
   85|  2.25k|  set->ids = set->sids;
   86|  2.25k|  set->psl = set->spsl;
   87|  2.25k|  set->slotbits = CURL_U8_STRSET_START_BITS;
  ------------------
  |  |   39|  2.25k|#define CURL_U8_STRSET_START_BITS   3
  ------------------
   88|  2.25k|  set->count = 0;
   89|  2.25k|#ifdef DEBUGBUILD
   90|  2.25k|  set->init = CURL_U8_STRSET_MAGIC;
  ------------------
  |  |   31|  2.25k|#define CURL_U8_STRSET_MAGIC 0x7117e783
  ------------------
   91|  2.25k|#endif
   92|  2.25k|}
Curl_u8_strset_clear:
   95|    753|{
   96|    753|  uint16_t i;
   97|    753|  DEBUGASSERT(set->init == CURL_U8_STRSET_MAGIC);
  ------------------
  |  | 1027|    753|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (97:3): [True: 0, False: 753]
  |  Branch (97:3): [True: 753, False: 0]
  ------------------
   98|  6.77k|  for(i = 0; i < CURL_U8_SET_SLOT_CNT(set); ++i)
  ------------------
  |  |   52|  6.77k|#define CURL_U8_SET_SLOT_CNT(s)       CURL_U8_SLOT_CNT((s)->slotbits)
  |  |  ------------------
  |  |  |  |   51|  6.77k|#define CURL_U8_SLOT_CNT(i)           ((uint16_t)u8_smask[(i)] + 1)
  |  |  ------------------
  ------------------
  |  Branch (98:14): [True: 6.02k, False: 753]
  ------------------
   99|  6.02k|    curlx_safefree(set->data[i]);
  ------------------
  |  | 1284|  6.77k|  do {                      \
  |  | 1285|  6.02k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1428|  6.02k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1286|  6.02k|    (ptr) = NULL;           \
  |  | 1287|  6.02k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1287:11): [Folded, False: 6.02k]
  |  |  ------------------
  ------------------
  100|       |
  101|    753|  if(set->data != set->sdata)
  ------------------
  |  Branch (101:6): [True: 0, False: 753]
  ------------------
  102|       |    curlx_safefree(set->data);
  ------------------
  |  | 1284|      0|  do {                      \
  |  | 1285|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1428|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1286|      0|    (ptr) = NULL;           \
  |  | 1287|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1287:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  103|    753|  Curl_u8_strset_init(set);
  104|    753|}
Curl_u8_strset_get:
  205|  1.50k|{
  206|  1.50k|  uint8_t i;
  207|  1.50k|  DEBUGASSERT(set->init == CURL_U8_STRSET_MAGIC);
  ------------------
  |  | 1027|  1.50k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (207:3): [True: 0, False: 1.50k]
  |  Branch (207:3): [True: 1.50k, False: 0]
  ------------------
  208|  1.50k|  if(u8_strset_get_index(set, id, &i))
  ------------------
  |  Branch (208:6): [True: 0, False: 1.50k]
  ------------------
  209|      0|    return set->data[i];
  210|  1.50k|  return NULL;
  211|  1.50k|}
Curl_u8_strset_unset0:
  301|  3.76k|{
  302|       |  u8_strset_unset(set, id, TRUE);
  ------------------
  |  |  997|  3.76k|#define TRUE true
  ------------------
  303|  3.76k|}
uint-hashset.c:u8_strset_get_index:
  175|  5.27k|{
  176|  5.27k|  uint8_t i = CURL_U8_SET_SLOT_IDX(set, id);
  ------------------
  |  |   50|  5.27k|#define CURL_U8_SET_SLOT_IDX(s, i)    (uint8_t)((i) & u8_smask[(s)->slotbits])
  ------------------
  177|  5.27k|  uint8_t psl = 0;
  178|  5.27k|  while(set->data[i] && (psl <= set->psl[i])) {
  ------------------
  |  Branch (178:9): [True: 0, False: 5.27k]
  |  Branch (178:25): [True: 0, False: 0]
  ------------------
  179|      0|    if(set->ids[i] == id) {
  ------------------
  |  Branch (179:8): [True: 0, False: 0]
  ------------------
  180|      0|      *pindex = i;
  181|       |#if CURL_U8_STRSET_DEBUG
  182|       |      curl_mfprintf(stderr, "u8_strset_index %d=%s\n", id, set->data[i]);
  183|       |#endif
  184|      0|      return TRUE;
  ------------------
  |  |  997|      0|#define TRUE true
  ------------------
  185|      0|    }
  186|      0|    i = CURL_U8_SET_SLOT_IDX(set, i + 1);
  ------------------
  |  |   50|      0|#define CURL_U8_SET_SLOT_IDX(s, i)    (uint8_t)((i) & u8_smask[(s)->slotbits])
  ------------------
  187|      0|    ++psl;
  188|      0|  }
  189|       |#if CURL_U8_STRSET_DEBUG
  190|       |  curl_mfprintf(stderr, "u8_strset_index %d not found\n", id);
  191|       |#endif
  192|  5.27k|  *pindex = 0;
  193|       |  return FALSE;
  ------------------
  |  | 1000|  5.27k|#define FALSE false
  ------------------
  194|  5.27k|}
uint-hashset.c:u8_strset_unset:
  270|  3.76k|{
  271|  3.76k|  uint8_t i, j;
  272|       |
  273|  3.76k|  DEBUGASSERT(set->init == CURL_U8_STRSET_MAGIC);
  ------------------
  |  | 1027|  3.76k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (273:3): [True: 0, False: 3.76k]
  |  Branch (273:3): [True: 3.76k, False: 0]
  ------------------
  274|  3.76k|  if(u8_strset_get_index(set, id, &i)) {
  ------------------
  |  Branch (274:6): [True: 0, False: 3.76k]
  ------------------
  275|       |    /* `id` is in set */
  276|      0|    if(zero)
  ------------------
  |  Branch (276:8): [True: 0, False: 0]
  ------------------
  277|      0|      curlx_strzero(set->data[i]);
  278|      0|    curlx_safefree(set->data[i]);
  ------------------
  |  | 1284|      0|  do {                      \
  |  | 1285|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1428|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1286|      0|    (ptr) = NULL;           \
  |  | 1287|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1287:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  279|      0|    set->ids[i] = set->psl[i] = 0;
  280|      0|    --set->count;
  281|      0|    j = CURL_U8_SET_SLOT_IDX(set, i + 1);
  ------------------
  |  |   50|      0|#define CURL_U8_SET_SLOT_IDX(s, i)    (uint8_t)((i) & u8_smask[(s)->slotbits])
  ------------------
  282|       |    /* shift all entries with positive psl "down" */
  283|      0|    while(set->data[j] && set->psl[j]) {
  ------------------
  |  Branch (283:11): [True: 0, False: 0]
  |  Branch (283:27): [True: 0, False: 0]
  ------------------
  284|      0|      set->data[i] = set->data[j];
  285|      0|      set->ids[i] = set->ids[j];
  286|      0|      set->psl[i] = (uint8_t)(set->psl[j] - 1);
  287|      0|      set->data[j] = NULL;
  288|      0|      set->ids[j] = set->psl[j] = 0;
  289|      0|      i = j;
  290|      0|      j = CURL_U8_SET_SLOT_IDX(set, i + 1);
  ------------------
  |  |   50|      0|#define CURL_U8_SET_SLOT_IDX(s, i)    (uint8_t)((i) & u8_smask[(s)->slotbits])
  ------------------
  291|      0|    }
  292|      0|  }
  293|  3.76k|}

Curl_freeset:
  148|    753|{
  149|       |  /* Free all dynamic strings stored in the data->set substructure. */
  150|    753|  enum dupblob j;
  151|       |
  152|    753|  CURL_EASY_STR_CLEAR0(data, STRING_PASSWORD);
  ------------------
  |  | 1242|    753|  Curl_u8_strset_unset0(&(d)->set.strings, (uint8_t)(id))
  ------------------
  153|    753|  CURL_EASY_STR_CLEAR0(data, STRING_KEY_PASSWD);
  ------------------
  |  | 1242|    753|  Curl_u8_strset_unset0(&(d)->set.strings, (uint8_t)(id))
  ------------------
  154|    753|  CURL_EASY_STR_CLEAR0(data, STRING_BEARER);
  ------------------
  |  | 1242|    753|  Curl_u8_strset_unset0(&(d)->set.strings, (uint8_t)(id))
  ------------------
  155|    753|#ifndef CURL_DISABLE_PROXY
  156|    753|  CURL_EASY_STR_CLEAR0(data, STRING_PROXYPASSWORD);
  ------------------
  |  | 1242|    753|  Curl_u8_strset_unset0(&(d)->set.strings, (uint8_t)(id))
  ------------------
  157|    753|  CURL_EASY_STR_CLEAR0(data, STRING_KEY_PASSWD_PROXY);
  ------------------
  |  | 1242|    753|  Curl_u8_strset_unset0(&(d)->set.strings, (uint8_t)(id))
  ------------------
  158|    753|#endif
  159|    753|  Curl_u8_strset_clear(&data->set.strings);
  160|    753|  curlx_safefree(data->set.str_copypostfields);
  ------------------
  |  | 1284|    753|  do {                      \
  |  | 1285|    753|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1428|    753|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1286|    753|    (ptr) = NULL;           \
  |  | 1287|    753|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1287:11): [Folded, False: 753]
  |  |  ------------------
  ------------------
  161|       |
  162|  6.77k|  for(j = (enum dupblob)0; j < BLOB_LAST; j++) {
  ------------------
  |  Branch (162:28): [True: 6.02k, False: 753]
  ------------------
  163|  6.02k|    curlx_safefree(data->set.blobs[j]);
  ------------------
  |  | 1284|  6.02k|  do {                      \
  |  | 1285|  6.02k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1428|  6.02k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1286|  6.02k|    (ptr) = NULL;           \
  |  | 1287|  6.02k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1287:11): [Folded, False: 6.02k]
  |  |  ------------------
  ------------------
  164|  6.02k|  }
  165|       |
  166|    753|  Curl_bufref_free(&data->state.referer);
  167|    753|  Curl_bufref_free(&data->state.url);
  168|       |
  169|    753|#if !defined(CURL_DISABLE_MIME) || !defined(CURL_DISABLE_FORM_API)
  170|    753|  Curl_mime_cleanpart(data->set.mimepostp);
  171|    753|  curlx_safefree(data->set.mimepostp);
  ------------------
  |  | 1284|    753|  do {                      \
  |  | 1285|    753|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1428|    753|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1286|    753|    (ptr) = NULL;           \
  |  | 1287|    753|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1287:11): [Folded, False: 753]
  |  |  ------------------
  ------------------
  172|    753|#endif
  173|       |
  174|    753|#ifndef CURL_DISABLE_COOKIES
  175|    753|  curl_slist_free_all(data->state.cookielist);
  176|       |  data->state.cookielist = NULL;
  177|    753|#endif
  178|    753|}
Curl_close:
  198|    753|{
  199|    753|  struct Curl_easy *data;
  200|       |
  201|    753|  if(!datap || !*datap)
  ------------------
  |  Branch (201:6): [True: 0, False: 753]
  |  Branch (201:16): [True: 0, False: 753]
  ------------------
  202|      0|    return CURLE_OK;
  203|       |
  204|    753|  data = *datap;
  205|    753|  *datap = NULL;
  206|       |
  207|    753|  if(!data->state.internal && data->multi) {
  ------------------
  |  Branch (207:6): [True: 753, False: 0]
  |  Branch (207:31): [True: 0, False: 753]
  ------------------
  208|       |    /* This handle is still part of a multi handle, take care of this first
  209|       |       and detach this handle from there.
  210|       |       This detaches the connection. */
  211|      0|    Curl_multi_remove_handle(data->multi, data);
  212|      0|  }
  213|    753|  else {
  214|       |    /* Detach connection if any is left. This should not be normal, but can be
  215|       |       the case for example with CONNECT_ONLY + recv/send (test 556) */
  216|    753|    Curl_detach_connection(data);
  217|    753|    if(!data->state.internal && data->multi_easy) {
  ------------------
  |  Branch (217:8): [True: 753, False: 0]
  |  Branch (217:33): [True: 0, False: 753]
  ------------------
  218|       |      /* when curl_easy_perform() is used, it creates its own multi handle to
  219|       |         use and this is the one */
  220|      0|      curl_multi_cleanup(data->multi_easy);
  221|      0|      data->multi_easy = NULL;
  222|      0|    }
  223|    753|  }
  224|    753|  DEBUGASSERT(!data->conn || data->state.internal);
  ------------------
  |  | 1027|    753|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (224:3): [True: 753, False: 0]
  |  Branch (224:3): [True: 0, False: 0]
  |  Branch (224:3): [True: 753, False: 0]
  |  Branch (224:3): [True: 0, False: 0]
  ------------------
  225|       |
  226|    753|  Curl_expire_clear_all(data); /* shut off any timers left */
  227|       |
  228|    753|  if(data->state.rangestringalloc)
  ------------------
  |  Branch (228:6): [True: 0, False: 753]
  ------------------
  229|      0|    curlx_free(data->state.range);
  ------------------
  |  | 1428|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  230|       |
  231|       |  /* release any resolve information this transfer kept */
  232|    753|  Curl_resolv_destroy_all(data);
  233|       |
  234|    753|  data->set.verbose = FALSE; /* no more calls to DEBUGFUNCTION */
  ------------------
  |  | 1000|    753|#define FALSE false
  ------------------
  235|    753|  data->magic = 0; /* force a clear AFTER the possibly enforced removal from
  236|       |                    * the multi handle and async dns shutdown. The multi
  237|       |                    * handle might check the magic and so might any
  238|       |                    * DEBUGFUNCTION invoked for tracing */
  239|       |
  240|       |  /* freed here in case DONE was not called */
  241|    753|  Curl_req_free(&data->req, data);
  242|       |
  243|       |  /* Close down all open SSL info and sessions */
  244|    753|  Curl_ssl_close_all(data);
  245|    753|  Curl_peer_unlink(&data->state.origin);
  246|    753|  Curl_peer_unlink(&data->state.initial_origin);
  247|    753|  Curl_ssl_free_certinfo(data);
  248|       |
  249|    753|  Curl_bufref_free(&data->state.referer);
  250|       |
  251|    753|  up_free(data);
  252|    753|  curlx_dyn_free(&data->state.headerb);
  253|    753|  Curl_flush_cookies(data, TRUE);
  ------------------
  |  |  997|    753|#define TRUE true
  ------------------
  254|    753|#ifndef CURL_DISABLE_ALTSVC
  255|    753|  Curl_altsvc_save(data, data->asi, CURL_EASY_STR(data, STRING_ALTSVC));
  ------------------
  |  | 1234|    753|  Curl_u8_strset_get(&(d)->set.strings, (uint8_t)(id))
  ------------------
  256|    753|  Curl_altsvc_cleanup(&data->asi);
  257|    753|#endif
  258|    753|#ifndef CURL_DISABLE_HSTS
  259|    753|  Curl_hsts_save(data, data->hsts, CURL_EASY_STR(data, STRING_HSTS));
  ------------------
  |  | 1234|    753|  Curl_u8_strset_get(&(d)->set.strings, (uint8_t)(id))
  ------------------
  260|    753|  if(!data->share || !data->share->hsts)
  ------------------
  |  Branch (260:6): [True: 753, False: 0]
  |  Branch (260:22): [True: 0, False: 0]
  ------------------
  261|    753|    Curl_hsts_cleanup(&data->hsts);
  262|    753|  curl_slist_free_all(data->state.hstslist); /* clean up list */
  263|    753|#endif
  264|    753|#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_DIGEST_AUTH)
  265|    753|  Curl_http_auth_cleanup_digest(data);
  266|    753|#endif
  267|    753|  curlx_safefree(data->state.most_recent_ftp_entrypath);
  ------------------
  |  | 1284|    753|  do {                      \
  |  | 1285|    753|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1428|    753|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1286|    753|    (ptr) = NULL;           \
  |  | 1287|    753|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1287:11): [Folded, False: 753]
  |  |  ------------------
  ------------------
  268|    753|  curlx_safefree(data->info.contenttype);
  ------------------
  |  | 1284|    753|  do {                      \
  |  | 1285|    753|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1428|    753|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1286|    753|    (ptr) = NULL;           \
  |  | 1287|    753|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1287:11): [Folded, False: 753]
  |  |  ------------------
  ------------------
  269|    753|  curlx_safefree(data->info.wouldredirect);
  ------------------
  |  | 1284|    753|  do {                      \
  |  | 1285|    753|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1428|    753|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1286|    753|    (ptr) = NULL;           \
  |  | 1287|    753|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1287:11): [Folded, False: 753]
  |  |  ------------------
  ------------------
  270|       |
  271|       |  /* No longer a dirty share, if it exists */
  272|    753|  if(Curl_share_easy_unlink(data))
  ------------------
  |  Branch (272:6): [True: 0, False: 753]
  ------------------
  273|    753|    DEBUGASSERT(0);
  ------------------
  |  | 1027|    753|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (273:5): [Folded, False: 0]
  |  Branch (273:5): [Folded, False: 0]
  ------------------
  274|       |
  275|    753|  Curl_hash_destroy(&data->meta_hash);
  276|    753|  Curl_creds_unlink(&data->state.creds);
  277|    753|#ifndef CURL_DISABLE_HTTP
  278|    753|  curlx_safefree(data->state.rangeline);
  ------------------
  |  | 1284|    753|  do {                      \
  |  | 1285|    753|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1428|    753|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1286|    753|    (ptr) = NULL;           \
  |  | 1287|    753|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1287:11): [Folded, False: 753]
  |  |  ------------------
  ------------------
  279|    753|  curlx_safefree(data->state.http_host);
  ------------------
  |  | 1284|    753|  do {                      \
  |  | 1285|    753|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1428|    753|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1286|    753|    (ptr) = NULL;           \
  |  | 1287|    753|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1287:11): [Folded, False: 753]
  |  |  ------------------
  ------------------
  280|    753|#endif
  281|    753|#ifndef CURL_DISABLE_COOKIES
  282|    753|  curlx_safefree(data->req.cookiehost);
  ------------------
  |  | 1284|    753|  do {                      \
  |  | 1285|    753|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1428|    753|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1286|    753|    (ptr) = NULL;           \
  |  | 1287|    753|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1287:11): [Folded, False: 753]
  |  |  ------------------
  ------------------
  283|    753|#endif
  284|       |
  285|    753|#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_FORM_API)
  286|    753|  Curl_mime_cleanpart(data->state.formp);
  287|    753|  curlx_safefree(data->state.formp);
  ------------------
  |  | 1284|    753|  do {                      \
  |  | 1285|    753|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1428|    753|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1286|    753|    (ptr) = NULL;           \
  |  | 1287|    753|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1287:11): [Folded, False: 753]
  |  |  ------------------
  ------------------
  288|    753|#endif
  289|       |
  290|       |  /* destruct wildcard structures if it is needed */
  291|    753|  Curl_wildcard_dtor(&data->wildcard);
  292|    753|  Curl_freeset(data);
  293|    753|  Curl_headers_cleanup(data);
  294|    753|  Curl_netrc_cleanup(&data->state.netrc);
  295|    753|#ifndef CURL_DISABLE_DIGEST_AUTH
  296|    753|  curlx_free(data->state.envproxy);
  ------------------
  |  | 1428|    753|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  297|    753|#endif
  298|    753|  curlx_memzero(data, sizeof(*data));
  299|    753|  curlx_free(data);
  ------------------
  |  | 1428|    753|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  300|    753|  return CURLE_OK;
  301|    753|}
Curl_init_userdefined:
  308|    753|{
  309|    753|  struct UserDefined *set = &data->set;
  310|       |
  311|    753|  set->out = stdout;  /* default output to stdout */
  312|    753|  set->in_set = stdin;  /* default input from stdin */
  313|    753|  set->err = stderr;  /* default stderr to stderr */
  314|       |
  315|    753|  Curl_u8_strset_init(&data->set.strings);
  316|       |
  317|    753|#if defined(__clang__) && __clang_major__ >= 16
  318|    753|#pragma clang diagnostic push
  319|    753|#pragma clang diagnostic ignored "-Wcast-function-type-strict"
  320|    753|#endif
  321|       |  /* use fwrite as default function to store output */
  322|    753|  set->fwrite_func = (curl_write_callback)fwrite;
  323|       |
  324|       |  /* use fread as default function to read input */
  325|    753|  set->fread_func_set = (curl_read_callback)fread;
  326|    753|#if defined(__clang__) && __clang_major__ >= 16
  327|    753|#pragma clang diagnostic pop
  328|    753|#endif
  329|    753|  set->is_fread_set = 0;
  330|       |
  331|    753|  set->seek_client = ZERO_NULL;
  ------------------
  |  | 1110|    753|#define ZERO_NULL 0
  ------------------
  332|       |
  333|    753|  set->filesize = -1;        /* we do not know the size */
  334|    753|  set->postfieldsize = -1;   /* unknown size */
  335|    753|  set->maxredirs = 30;       /* sensible default */
  336|       |
  337|    753|  set->method = HTTPREQ_GET; /* Default HTTP request */
  338|    753|#ifndef CURL_DISABLE_RTSP
  339|    753|  set->rtspreq = RTSPREQ_OPTIONS; /* Default RTSP request */
  ------------------
  |  |   34|    753|#define RTSPREQ_OPTIONS CURL_RTSPREQ_OPTIONS
  |  |  ------------------
  |  |  |  | 2367|    753|#define CURL_RTSPREQ_OPTIONS       1L
  |  |  ------------------
  ------------------
  340|    753|#endif
  341|    753|#ifndef CURL_DISABLE_FTP
  342|    753|  set->ftp_use_epsv = TRUE;   /* FTP defaults to EPSV operations */
  ------------------
  |  |  997|    753|#define TRUE true
  ------------------
  343|    753|  set->ftp_use_eprt = TRUE;   /* FTP defaults to EPRT operations */
  ------------------
  |  |  997|    753|#define TRUE true
  ------------------
  344|    753|  set->ftp_use_pret = FALSE;  /* mainly useful for drftpd servers */
  ------------------
  |  | 1000|    753|#define FALSE false
  ------------------
  345|    753|  set->ftp_filemethod = FTPFILE_MULTICWD;
  346|    753|  set->ftp_skip_ip = TRUE;    /* skip PASV IP by default */
  ------------------
  |  |  997|    753|#define TRUE true
  ------------------
  347|    753|#endif
  348|    753|  set->dns_cache_timeout_ms = 60000; /* Timeout every 60 seconds by default */
  349|       |
  350|       |  /* Timeout every 24 hours by default */
  351|    753|  set->ssl_ca_cache_timeout = 24 * 60 * 60;
  352|       |
  353|    753|  set->httpauth = CURLAUTH_BASIC;  /* defaults to basic */
  ------------------
  |  |  833|    753|#define CURLAUTH_BASIC        (((unsigned long)1) << 0)
  ------------------
  354|       |
  355|    753|  Curl_ssl_config_init(&data->set.ssl);
  356|    753|#ifndef CURL_DISABLE_PROXY
  357|    753|  Curl_ssl_config_init(&data->set.proxy_ssl);
  358|    753|  set->proxyport = 0;
  359|    753|  set->proxytype = CURLPROXY_HTTP; /* defaults to HTTP proxy */
  ------------------
  |  |  792|    753|#define CURLPROXY_HTTP            0L /* added in 7.10, new in 7.19.4 default is
  ------------------
  360|    753|  set->proxyauth = CURLAUTH_BASIC; /* defaults to basic */
  ------------------
  |  |  833|    753|#define CURLAUTH_BASIC        (((unsigned long)1) << 0)
  ------------------
  361|       |  /* SOCKS5 proxy auth defaults to username/password + GSS-API */
  362|    753|  set->socks5auth = CURLAUTH_BASIC | CURLAUTH_GSSAPI;
  ------------------
  |  |  833|    753|#define CURLAUTH_BASIC        (((unsigned long)1) << 0)
  ------------------
                set->socks5auth = CURLAUTH_BASIC | CURLAUTH_GSSAPI;
  ------------------
  |  |  839|    753|#define CURLAUTH_GSSAPI CURLAUTH_NEGOTIATE
  |  |  ------------------
  |  |  |  |  835|    753|#define CURLAUTH_NEGOTIATE    (((unsigned long)1) << 2)
  |  |  ------------------
  ------------------
  363|    753|#endif
  364|       |
  365|    753|#ifndef CURL_DISABLE_DOH
  366|    753|  set->doh_verifyhost = TRUE;
  ------------------
  |  |  997|    753|#define TRUE true
  ------------------
  367|    753|  set->doh_verifypeer = TRUE;
  ------------------
  |  |  997|    753|#define TRUE true
  ------------------
  368|    753|#endif
  369|       |#ifdef USE_SSH
  370|       |  /* defaults to any auth type */
  371|       |  set->ssh_auth_types = CURLSSH_AUTH_DEFAULT;
  372|       |  set->new_directory_perms = 0755; /* Default permissions */
  373|       |#endif
  374|       |
  375|    753|  set->new_file_perms = 0644;    /* Default permissions */
  376|    753|  set->allowed_protocols = (curl_prot_t)CURLPROTO_64ALL;
  ------------------
  |  |   66|    753|#define CURLPROTO_64ALL ((uint64_t)0xffffffffffffffff)
  ------------------
  377|    753|  set->redir_protocols = CURLPROTO_REDIR;
  ------------------
  |  |   69|    753|#define CURLPROTO_REDIR (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_FTP | \
  |  |  ------------------
  |  |  |  | 1088|    753|#define CURLPROTO_HTTP    (1L << 0)
  |  |  ------------------
  |  |               #define CURLPROTO_REDIR (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_FTP | \
  |  |  ------------------
  |  |  |  | 1089|    753|#define CURLPROTO_HTTPS   (1L << 1)
  |  |  ------------------
  |  |               #define CURLPROTO_REDIR (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_FTP | \
  |  |  ------------------
  |  |  |  | 1090|    753|#define CURLPROTO_FTP     (1L << 2)
  |  |  ------------------
  |  |   70|    753|                         CURLPROTO_FTPS)
  |  |  ------------------
  |  |  |  | 1091|    753|#define CURLPROTO_FTPS    (1L << 3)
  |  |  ------------------
  ------------------
  378|       |
  379|       |#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
  380|       |  /*
  381|       |   * disallow unprotected protection negotiation NEC reference implementation
  382|       |   * seem not to follow rfc1961 section 4.3/4.4
  383|       |   */
  384|       |  set->socks5_gssapi_nec = FALSE;
  385|       |#endif
  386|       |
  387|       |  /* set default minimum TLS version */
  388|    753|#ifdef USE_SSL
  389|    753|  Curl_setopt_SSLVERSION(data, CURLOPT_SSLVERSION, CURL_SSLVERSION_DEFAULT);
  ------------------
  |  | 2394|    753|#define CURL_SSLVERSION_DEFAULT 0L
  ------------------
  390|    753|#ifndef CURL_DISABLE_PROXY
  391|    753|  Curl_setopt_SSLVERSION(data, CURLOPT_PROXY_SSLVERSION,
  392|    753|                         CURL_SSLVERSION_DEFAULT);
  ------------------
  |  | 2394|    753|#define CURL_SSLVERSION_DEFAULT 0L
  ------------------
  393|    753|#endif
  394|    753|#endif
  395|    753|#ifndef CURL_DISABLE_FTP
  396|    753|  set->wildcard_enabled = FALSE;
  ------------------
  |  | 1000|    753|#define FALSE false
  ------------------
  397|    753|  set->chunk_bgn = ZERO_NULL;
  ------------------
  |  | 1110|    753|#define ZERO_NULL 0
  ------------------
  398|    753|  set->chunk_end = ZERO_NULL;
  ------------------
  |  | 1110|    753|#define ZERO_NULL 0
  ------------------
  399|    753|  set->fnmatch = ZERO_NULL;
  ------------------
  |  | 1110|    753|#define ZERO_NULL 0
  ------------------
  400|    753|#endif
  401|    753|  set->tcp_keepalive = FALSE;
  ------------------
  |  | 1000|    753|#define FALSE false
  ------------------
  402|    753|  set->tcp_keepintvl = 60;
  403|    753|  set->tcp_keepidle = 60;
  404|    753|  set->tcp_keepcnt = 9;
  405|    753|  set->tcp_fastopen = FALSE;
  ------------------
  |  | 1000|    753|#define FALSE false
  ------------------
  406|    753|  set->tcp_nodelay = TRUE;
  ------------------
  |  |  997|    753|#define TRUE true
  ------------------
  407|    753|  set->ssl_enable_alpn = TRUE;
  ------------------
  |  |  997|    753|#define TRUE true
  ------------------
  408|    753|  set->expect_100_timeout = 1000L; /* Wait for a second by default. */
  409|    753|  set->sep_headers = TRUE; /* separated header lists by default */
  ------------------
  |  |  997|    753|#define TRUE true
  ------------------
  410|    753|  set->buffer_size = READBUFFER_SIZE;
  ------------------
  |  |  120|    753|#define READBUFFER_SIZE CURL_MAX_WRITE_SIZE
  |  |  ------------------
  |  |  |  |  267|    753|#define CURL_MAX_WRITE_SIZE 16384
  |  |  ------------------
  ------------------
  411|    753|  set->upload_buffer_size = UPLOADBUFFER_DEFAULT;
  ------------------
  |  |  132|    753|#define UPLOADBUFFER_DEFAULT 65536
  ------------------
  412|    753|  set->upload_flags = CURLULFLAG_SEEN;
  ------------------
  |  | 1054|    753|#define CURLULFLAG_SEEN     (1L << 4)
  ------------------
  413|    753|  set->happy_eyeballs_timeout = CURL_HET_DEFAULT;
  ------------------
  |  |  979|    753|#define CURL_HET_DEFAULT 200L
  ------------------
  414|    753|  set->upkeep_interval_ms = CURL_UPKEEP_INTERVAL_DEFAULT;
  ------------------
  |  |  982|    753|#define CURL_UPKEEP_INTERVAL_DEFAULT 60000L
  ------------------
  415|    753|  set->maxconnects = DEFAULT_CONNCACHE_SIZE; /* for easy handles */
  ------------------
  |  |   38|    753|#define DEFAULT_CONNCACHE_SIZE 5
  ------------------
  416|    753|  set->conn_max_idle_ms = 118 * 1000;
  417|    753|  set->conn_max_age_ms = 24 * 3600 * 1000;
  418|    753|  set->http09_allowed = FALSE;
  ------------------
  |  | 1000|    753|#define FALSE false
  ------------------
  419|    753|  set->httpwant = CURL_HTTP_VERSION_NONE;
  ------------------
  |  | 2338|    753|#define CURL_HTTP_VERSION_NONE  0L /* setting this means we do not care, and
  ------------------
  420|    753|#if defined(USE_HTTP2) || defined(USE_HTTP3)
  421|    753|  set->weight = 0;
  422|    753|#endif
  423|    753|  set->quick_exit = 0L;
  424|    753|#ifndef CURL_DISABLE_WEBSOCKETS
  425|    753|  set->ws_raw_mode = FALSE;
  ------------------
  |  | 1000|    753|#define FALSE false
  ------------------
  426|       |  set->ws_no_auto_pong = FALSE;
  ------------------
  |  | 1000|    753|#define FALSE false
  ------------------
  427|    753|#endif
  428|    753|}
Curl_open:
  449|    753|{
  450|    753|  struct Curl_easy *data;
  451|       |
  452|       |  /* simple start-up: alloc the struct, init it with zeroes and return */
  453|    753|  data = curlx_calloc(1, sizeof(struct Curl_easy));
  ------------------
  |  | 1425|    753|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  454|    753|  if(!data) {
  ------------------
  |  Branch (454:6): [True: 0, False: 753]
  ------------------
  455|       |    /* this is a serious error */
  456|      0|    DEBUGF(curl_mfprintf(stderr, "Error: calloc of Curl_easy failed\n"));
  ------------------
  |  | 1013|      0|#define DEBUGF(x) x
  ------------------
  457|      0|    return CURLE_OUT_OF_MEMORY;
  458|      0|  }
  459|       |
  460|    753|  data->magic = CURLEASY_MAGIC_NUMBER;
  ------------------
  |  |   28|    753|#define CURLEASY_MAGIC_NUMBER 0xc0dedbadU
  ------------------
  461|       |  /* most recent connection is not yet defined */
  462|    753|  data->state.lastconnect_id = -1;
  463|       |  /* and not assigned an id yet */
  464|    753|  data->id = -1;
  465|    753|  data->mid = UINT32_MAX;
  466|    753|  data->master_mid = UINT32_MAX;
  467|    753|  data->progress.hide = TRUE;
  ------------------
  |  |  997|    753|#define TRUE true
  ------------------
  468|       |
  469|    753|  Curl_hash_init(&data->meta_hash, 23, CURL_HASH_TYPE_BYTES,
  470|    753|                 easy_meta_freeentry);
  471|    753|  DEBUGASSERT(STRING_LAST <= UINT8_MAX);
  ------------------
  |  | 1027|    753|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (471:3): [True: 0, Folded]
  |  Branch (471:3): [True: 753, Folded]
  ------------------
  472|    753|  Curl_u8_strset_init(&data->set.strings);
  473|    753|  curlx_dyn_init(&data->state.headerb, CURL_MAX_HTTP_HEADER);
  ------------------
  |  |  274|    753|#define CURL_MAX_HTTP_HEADER (100 * 1024)
  ------------------
  474|    753|  Curl_bufref_init(&data->state.url);
  475|    753|  Curl_bufref_init(&data->state.referer);
  476|    753|  Curl_req_init(&data->req);
  477|    753|  Curl_initinfo(data);
  478|    753|#ifndef CURL_DISABLE_HTTP
  479|    753|  Curl_llist_init(&data->state.httphdrs, NULL);
  480|    753|#endif
  481|    753|  Curl_netrc_init(&data->state.netrc);
  482|    753|  Curl_init_userdefined(data);
  483|       |
  484|    753|  *curl = data;
  485|    753|  return CURLE_OK;
  486|    753|}
url.c:up_free:
  182|    753|{
  183|    753|  struct urlpieces *up = &data->state.up;
  184|    753|  curlx_safefree(up->options);
  ------------------
  |  | 1284|    753|  do {                      \
  |  | 1285|    753|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1428|    753|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1286|    753|    (ptr) = NULL;           \
  |  | 1287|    753|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1287:11): [Folded, False: 753]
  |  |  ------------------
  ------------------
  185|    753|  curlx_safefree(up->path);
  ------------------
  |  | 1284|    753|  do {                      \
  |  | 1285|    753|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1428|    753|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1286|    753|    (ptr) = NULL;           \
  |  | 1287|    753|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1287:11): [Folded, False: 753]
  |  |  ------------------
  ------------------
  186|    753|  curlx_safefree(up->query);
  ------------------
  |  | 1284|    753|  do {                      \
  |  | 1285|    753|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1428|    753|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1286|    753|    (ptr) = NULL;           \
  |  | 1287|    753|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1287:11): [Folded, False: 753]
  |  |  ------------------
  ------------------
  187|    753|  curl_url_cleanup(data->state.uh);
  188|       |  data->state.uh = NULL;
  189|    753|}

curl_url_cleanup:
 1418|    753|{
 1419|    753|  if(u) {
  ------------------
  |  Branch (1419:6): [True: 0, False: 753]
  ------------------
 1420|      0|    free_urlhandle(u);
 1421|      0|    curlx_free(u);
  ------------------
  |  | 1428|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1422|      0|  }
 1423|    753|}

Curl_auth_digest_cleanup:
 1041|  1.50k|{
 1042|  1.50k|  Curl_peer_unlink(&digest->origin);
 1043|  1.50k|  Curl_creds_unlink(&digest->creds);
 1044|  1.50k|  curlx_safefree(digest->nonce);
  ------------------
  |  | 1284|  1.50k|  do {                      \
  |  | 1285|  1.50k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1428|  1.50k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1286|  1.50k|    (ptr) = NULL;           \
  |  | 1287|  1.50k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1287:11): [Folded, False: 1.50k]
  |  |  ------------------
  ------------------
 1045|  1.50k|  curlx_safefree(digest->cnonce);
  ------------------
  |  | 1284|  1.50k|  do {                      \
  |  | 1285|  1.50k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1428|  1.50k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1286|  1.50k|    (ptr) = NULL;           \
  |  | 1287|  1.50k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1287:11): [Folded, False: 1.50k]
  |  |  ------------------
  ------------------
 1046|  1.50k|  curlx_safefree(digest->realm);
  ------------------
  |  | 1284|  1.50k|  do {                      \
  |  | 1285|  1.50k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1428|  1.50k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1286|  1.50k|    (ptr) = NULL;           \
  |  | 1287|  1.50k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1287:11): [Folded, False: 1.50k]
  |  |  ------------------
  ------------------
 1047|  1.50k|  curlx_safefree(digest->opaque);
  ------------------
  |  | 1284|  1.50k|  do {                      \
  |  | 1285|  1.50k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1428|  1.50k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1286|  1.50k|    (ptr) = NULL;           \
  |  | 1287|  1.50k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1287:11): [Folded, False: 1.50k]
  |  |  ------------------
  ------------------
 1048|  1.50k|  curlx_safefree(digest->qop);
  ------------------
  |  | 1284|  1.50k|  do {                      \
  |  | 1285|  1.50k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1428|  1.50k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1286|  1.50k|    (ptr) = NULL;           \
  |  | 1287|  1.50k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1287:11): [Folded, False: 1.50k]
  |  |  ------------------
  ------------------
 1049|  1.50k|  curlx_safefree(digest->algorithm);
  ------------------
  |  | 1284|  1.50k|  do {                      \
  |  | 1285|  1.50k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1428|  1.50k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1286|  1.50k|    (ptr) = NULL;           \
  |  | 1287|  1.50k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1287:11): [Folded, False: 1.50k]
  |  |  ------------------
  ------------------
 1050|       |
 1051|  1.50k|  digest->nc = 0;
 1052|  1.50k|  digest->algo = ALGO_MD5; /* default algorithm */
  ------------------
  |  |   44|  1.50k|#define ALGO_MD5 0
  ------------------
 1053|  1.50k|  digest->stale = FALSE;   /* default means normal, not stale */
  ------------------
  |  | 1000|  1.50k|#define FALSE false
  ------------------
 1054|       |  digest->userhash = FALSE;
  ------------------
  |  | 1000|  1.50k|#define FALSE false
  ------------------
 1055|  1.50k|}

Curl_async_global_init:
   81|      2|{
   82|       |#if defined(USE_ARES) && defined(CARES_HAVE_ARES_LIBRARY_INIT)
   83|       |  if(ares_library_init(ARES_LIB_INIT_ALL)) {
   84|       |    return CURLE_FAILED_INIT;
   85|       |  }
   86|       |#endif
   87|      2|  return CURLE_OK;
   88|      2|}

Curl_resolv_destroy_all:
 1175|    753|{
 1176|    753|  while(data->state.async) {
  ------------------
  |  Branch (1176:9): [True: 0, False: 753]
  ------------------
 1177|      0|    struct Curl_resolv_async *async = data->state.async;
 1178|      0|    data->state.async = async->next;
 1179|      0|    Curl_async_destroy(data, async);
 1180|      0|  }
 1181|    753|}

Curl_tls_keylog_open:
   39|      2|{
   40|      2|  if(!keylog_file_fp) {
  ------------------
  |  Branch (40:6): [True: 2, False: 0]
  ------------------
   41|      2|    keylog_file_name = getenv("SSLKEYLOGFILE");
   42|      2|    if(keylog_file_name) {
  ------------------
  |  Branch (42:8): [True: 0, False: 2]
  ------------------
   43|      0|      keylog_file_fp = curlx_fopen(keylog_file_name, FOPEN_APPENDTEXT);
  ------------------
  |  |   76|      0|#define curlx_fopen(file, mode) curl_dbg_fopen(file, mode, __LINE__, __FILE__)
  ------------------
   44|      0|      if(keylog_file_fp) {
  ------------------
  |  Branch (44:10): [True: 0, False: 0]
  ------------------
   45|       |#ifdef _WIN32
   46|       |        if(setvbuf(keylog_file_fp, NULL, _IONBF, 0))
   47|       |#else
   48|      0|        if(setvbuf(keylog_file_fp, NULL, _IOLBF, 4096))
  ------------------
  |  Branch (48:12): [True: 0, False: 0]
  ------------------
   49|      0|#endif
   50|      0|        {
   51|      0|          curlx_fclose(keylog_file_fp);
  ------------------
  |  |   81|      0|#define curlx_fclose(file)      curl_dbg_fclose(file, __LINE__, __FILE__)
  ------------------
   52|       |          keylog_file_fp = NULL;
   53|      0|        }
   54|      0|      }
   55|      0|    }
   56|      2|  }
   57|      2|}

openssl.c:ossl_provider_cleanup:
 1728|    753|{
 1729|    753|  if(data->state.baseprov) {
  ------------------
  |  Branch (1729:6): [True: 0, False: 753]
  ------------------
 1730|      0|    OSSL_PROVIDER_unload(data->state.baseprov);
 1731|      0|    data->state.baseprov = NULL;
 1732|      0|  }
 1733|    753|  if(data->state.provider) {
  ------------------
  |  Branch (1733:6): [True: 0, False: 753]
  ------------------
 1734|      0|    OSSL_PROVIDER_unload(data->state.provider);
 1735|      0|    data->state.provider = NULL;
 1736|      0|  }
 1737|    753|  OSSL_LIB_CTX_free(data->state.libctx);
 1738|    753|  data->state.libctx = NULL;
 1739|    753|  curlx_safefree(data->state.propq);
  ------------------
  |  | 1284|    753|  do {                      \
  |  | 1285|    753|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1428|    753|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1286|    753|    (ptr) = NULL;           \
  |  | 1287|    753|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1287:11): [Folded, False: 753]
  |  |  ------------------
  ------------------
 1740|       |  data->state.provider_loaded = FALSE;
  ------------------
  |  | 1000|    753|#define FALSE false
  ------------------
 1741|    753|}
openssl.c:ossl_init:
 1612|      2|{
 1613|      2|  const uint64_t flags =
 1614|      2|#ifdef OPENSSL_INIT_ENGINE_ALL_BUILTIN
 1615|       |    /* not present in BoringSSL */
 1616|      2|    OPENSSL_INIT_ENGINE_ALL_BUILTIN |
 1617|      2|#endif
 1618|       |#ifdef CURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIG
 1619|       |    OPENSSL_INIT_NO_LOAD_CONFIG |
 1620|       |#else
 1621|      2|    OPENSSL_INIT_LOAD_CONFIG |
 1622|      2|#endif
 1623|      2|    0;
 1624|      2|  OPENSSL_init_ssl(flags, NULL);
 1625|       |
 1626|      2|#ifndef HAVE_KEYLOG_UPSTREAM
 1627|      2|  Curl_tls_keylog_open();
 1628|      2|#endif
 1629|       |
 1630|      2|  return 1;
 1631|      2|}
openssl.c:ossl_close_all:
 1975|    753|{
 1976|       |#ifdef USE_OPENSSL_ENGINE
 1977|       |  if(data->state.engine) {
 1978|       |    ENGINE_finish(data->state.engine);
 1979|       |    ENGINE_free(data->state.engine);
 1980|       |    data->state.engine = NULL;
 1981|       |  }
 1982|       |#else
 1983|    753|  (void)data;
 1984|    753|#endif
 1985|    753|#ifdef OPENSSL_HAS_PROVIDERS
 1986|    753|  ossl_provider_cleanup(data);
 1987|    753|#endif
 1988|    753|}

Curl_ssl_init:
  152|      2|{
  153|       |  /* make sure this is only done once */
  154|      2|  if(init_ssl)
  ------------------
  |  Branch (154:6): [True: 0, False: 2]
  ------------------
  155|      0|    return 1;
  156|      2|  init_ssl = TRUE; /* never again */
  ------------------
  |  |  997|      2|#define TRUE true
  ------------------
  157|       |
  158|      2|  if(Curl_ssl->init)
  ------------------
  |  Branch (158:6): [True: 2, False: 0]
  ------------------
  159|      2|    return Curl_ssl->init();
  160|      0|  return 1;
  161|      2|}
Curl_ssl_close_all:
  228|    753|{
  229|    753|  if(Curl_ssl->close_all)
  ------------------
  |  Branch (229:6): [True: 753, False: 0]
  ------------------
  230|    753|    Curl_ssl->close_all(data);
  231|    753|}
Curl_ssl_free_certinfo:
  297|  1.50k|{
  298|  1.50k|  struct curl_certinfo *ci = &data->info.certs;
  299|       |
  300|  1.50k|  if(ci->num_of_certs) {
  ------------------
  |  Branch (300:6): [True: 0, False: 1.50k]
  ------------------
  301|       |    /* free all individual lists used */
  302|      0|    int i;
  303|      0|    for(i = 0; i < ci->num_of_certs; i++) {
  ------------------
  |  Branch (303:16): [True: 0, False: 0]
  ------------------
  304|      0|      curl_slist_free_all(ci->certinfo[i]);
  305|      0|      ci->certinfo[i] = NULL;
  306|      0|    }
  307|       |
  308|       |    curlx_safefree(ci->certinfo); /* free the actual array too */
  ------------------
  |  | 1284|      0|  do {                      \
  |  | 1285|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1428|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1286|      0|    (ptr) = NULL;           \
  |  | 1287|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1287:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  309|      0|    ci->num_of_certs = 0;
  310|      0|  }
  311|  1.50k|}

Curl_ssl_config_init:
  101|  1.50k|{
  102|       |  /*
  103|       |   * libcurl 7.10 introduced SSL verification *by default*! This needs to be
  104|       |   * switched off unless wanted.
  105|       |   */
  106|  1.50k|  sslc->verifypeer = TRUE;
  ------------------
  |  |  997|  1.50k|#define TRUE true
  ------------------
  107|  1.50k|  sslc->verifyhost = TRUE;
  ------------------
  |  |  997|  1.50k|#define TRUE true
  ------------------
  108|       |  sslc->cache_session = TRUE; /* caching by default */
  ------------------
  |  |  997|  1.50k|#define TRUE true
  ------------------
  109|  1.50k|}

LLVMFuzzerTestOneInput:
   73|    756|                                      std::size_t size) {
   74|    756|  if (size == 0 || !WriteNetrcInput(data + 1, size - 1) ||
  ------------------
  |  Branch (74:7): [True: 0, False: 756]
  |  Branch (74:20): [True: 3, False: 753]
  ------------------
   75|    753|      kInputFile.path() == nullptr) {
  ------------------
  |  Branch (75:7): [True: 0, False: 753]
  ------------------
   76|      3|    return 0;
   77|      3|  }
   78|       |
   79|    753|  ProbeErrorStringsOnce();
   80|       |
   81|    753|  CURL *easy = curl_easy_init();
   82|    753|  if (easy == nullptr) {
  ------------------
  |  Branch (82:7): [True: 0, False: 753]
  ------------------
   83|      0|    return 0;
   84|      0|  }
   85|       |
   86|       |  // Use curl's real private type so layout/API changes fail at compile time.
   87|    753|  struct store_netrc store;
   88|    753|  struct Curl_creds *creds = nullptr;
   89|    753|  Curl_netrc_init(&store);
   90|       |
   91|    753|  const char *hostname = (data[0] & 1U) != 0 ? "other.test" : "fuzz.test";
  ------------------
  |  Branch (91:26): [True: 253, False: 500]
  ------------------
   92|    753|  const char *user = (data[0] & 2U) != 0 ? "fuzz-user" : nullptr;
  ------------------
  |  Branch (92:22): [True: 290, False: 463]
  ------------------
   93|    753|  const NETRCcode result =
   94|    753|      Curl_netrc_scan(reinterpret_cast<struct Curl_easy *>(easy), &store,
   95|    753|                      hostname, user, kInputFile.path(), &creds);
   96|    753|  (void)Curl_netrc_strerror(result);
   97|       |
   98|    753|  Curl_creds_unlink(&creds);
   99|    753|  Curl_netrc_cleanup(&store);
  100|    753|  curl_easy_cleanup(easy);
  101|    753|  return 0;
  102|    753|}
fuzz_netrc.cc:_ZN12_GLOBAL__N_113CurlBootstrapC2Ev:
   32|      2|  CurlBootstrap() { (void)curl_global_init(CURL_GLOBAL_ALL); }
  ------------------
  |  | 3047|      2|#define CURL_GLOBAL_ALL (CURL_GLOBAL_SSL | CURL_GLOBAL_WINSOCK)
  |  |  ------------------
  |  |  |  | 3044|      2|#define CURL_GLOBAL_SSL (1 << 0) /* no purpose since 7.57.0 */
  |  |  ------------------
  |  |               #define CURL_GLOBAL_ALL (CURL_GLOBAL_SSL | CURL_GLOBAL_WINSOCK)
  |  |  ------------------
  |  |  |  | 3045|      2|#define CURL_GLOBAL_WINSOCK (1 << 1)
  |  |  ------------------
  ------------------
fuzz_netrc.cc:_ZN12_GLOBAL__N_115WriteNetrcInputEPKhm:
   46|    756|bool WriteNetrcInput(const std::uint8_t *data, std::size_t size) {
   47|    756|  if (size > kMaxNetrcBytes) {
  ------------------
  |  Branch (47:7): [True: 3, False: 753]
  ------------------
   48|      3|    return false;
   49|      3|  }
   50|       |
   51|    753|  std::string file_contents(1, '\n');
   52|    753|  if (size != 0) {
  ------------------
  |  Branch (52:7): [True: 750, False: 3]
  ------------------
   53|    750|    file_contents.append(reinterpret_cast<const char *>(data), size);
   54|    750|  }
   55|    753|  return kInputFile.Write(
   56|    753|      reinterpret_cast<const std::uint8_t *>(file_contents.data()),
   57|    753|      file_contents.size());
   58|    756|}
fuzz_netrc.cc:_ZN12_GLOBAL__N_121ProbeErrorStringsOnceEv:
   60|    753|void ProbeErrorStringsOnce() {
   61|    753|  static const bool probed = [] {
   62|    753|    for (int value = 0; value < static_cast<int>(NETRC_LAST); ++value) {
   63|    753|      (void)Curl_netrc_strerror(static_cast<NETRCcode>(value));
   64|    753|    }
   65|    753|    return true;
   66|    753|  }();
   67|    753|  (void)probed;
   68|    753|}
fuzz_netrc.cc:_ZZN12_GLOBAL__N_121ProbeErrorStringsOnceEvENK3$_0clEv:
   61|      1|  static const bool probed = [] {
   62|      6|    for (int value = 0; value < static_cast<int>(NETRC_LAST); ++value) {
  ------------------
  |  Branch (62:25): [True: 5, False: 1]
  ------------------
   63|      5|      (void)Curl_netrc_strerror(static_cast<NETRCcode>(value));
   64|      5|    }
   65|      1|    return true;
   66|      1|  }();

_ZN12proto_fuzzer25BoundedAnonymousInputFileC2Em:
   21|      2|    : max_bytes_(max_bytes), file_(nullptr), ready_(false) {}
_ZN12proto_fuzzer25BoundedAnonymousInputFile10EnsureOpenEv:
   29|    753|bool BoundedAnonymousInputFile::EnsureOpen() {
   30|    753|  if (file_ != nullptr) {
  ------------------
  |  Branch (30:7): [True: 752, False: 1]
  ------------------
   31|    752|    return true;
   32|    752|  }
   33|       |
   34|      1|  file_ = std::tmpfile();
   35|      1|  if (file_ == nullptr) {
  ------------------
  |  Branch (35:7): [True: 0, False: 1]
  ------------------
   36|      0|    return false;
   37|      0|  }
   38|      1|  const int fd = fileno(file_);
   39|      1|  if (fd < 0) {
  ------------------
  |  Branch (39:7): [True: 0, False: 1]
  ------------------
   40|      0|    std::fclose(file_);
   41|      0|    file_ = nullptr;
   42|      0|    return false;
   43|      0|  }
   44|      1|  path_ = "/proc/self/fd/" + std::to_string(fd);
   45|      1|  return true;
   46|      1|}
_ZN12proto_fuzzer25BoundedAnonymousInputFile5WriteEPKhm:
   48|    753|bool BoundedAnonymousInputFile::Write(const std::uint8_t* data, std::size_t size) {
   49|    753|  ready_ = false;
   50|    753|  if (size > max_bytes_ || (data == nullptr && size != 0) || !EnsureOpen()) {
  ------------------
  |  Branch (50:7): [True: 0, False: 753]
  |  Branch (50:29): [True: 0, False: 753]
  |  Branch (50:48): [True: 0, False: 0]
  |  Branch (50:62): [True: 0, False: 753]
  ------------------
   51|      0|    return false;
   52|      0|  }
   53|       |
   54|    753|  const int fd = fileno(file_);
   55|    753|  if (fd < 0 || ftruncate(fd, 0) != 0) {
  ------------------
  |  Branch (55:7): [True: 0, False: 753]
  |  Branch (55:17): [True: 0, False: 753]
  ------------------
   56|      0|    return false;
   57|      0|  }
   58|       |
   59|    753|  std::size_t offset = 0;
   60|  1.50k|  while (offset < size) {
  ------------------
  |  Branch (60:10): [True: 753, False: 753]
  ------------------
   61|    753|    const ssize_t written = pwrite(fd, data + offset, size - offset, static_cast<off_t>(offset));
   62|    753|    if (written < 0 && errno == EINTR) {
  ------------------
  |  Branch (62:9): [True: 0, False: 753]
  |  Branch (62:24): [True: 0, False: 0]
  ------------------
   63|      0|      continue;
   64|      0|    }
   65|    753|    if (written <= 0) {
  ------------------
  |  Branch (65:9): [True: 0, False: 753]
  ------------------
   66|      0|      return false;
   67|      0|    }
   68|    753|    offset += static_cast<std::size_t>(written);
   69|    753|  }
   70|       |
   71|    753|  ready_ = true;
   72|    753|  return true;
   73|    753|}
_ZNK12proto_fuzzer25BoundedAnonymousInputFile4pathEv:
   75|  1.50k|const char* BoundedAnonymousInputFile::path() const { return ready_ ? path_.c_str() : nullptr; }
  ------------------
  |  Branch (75:62): [True: 1.50k, False: 0]
  ------------------

