MCPcopy Index your code
hub / github.com/git/git / set_long_from_env

Function set_long_from_env

http.c:1367–1387  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1365}
1366
1367static void set_long_from_env(long *var, const char *envname)
1368{
1369 const char *val = getenv(envname);
1370 if (val) {
1371 long tmp;
1372 char *endp;
1373 int saved_errno = errno;
1374
1375 errno = 0;
1376 tmp = strtol(val, &endp, 10);
1377
1378 if (errno)
1379 warning_errno(_("failed to parse %s"), envname);
1380 else if (*endp || endp == val)
1381 warning(_("failed to parse %s"), envname);
1382 else
1383 *var = tmp;
1384
1385 errno = saved_errno;
1386 }
1387}
1388
1389void http_init(struct remote *remote, const char *url, int proactive_auth)
1390{

Callers 1

http_initFunction · 0.85

Calls 2

warning_errnoFunction · 0.85
warningFunction · 0.85

Tested by

no test coverage detected