MCPcopy Create free account
hub / github.com/git/git / get_i

Function get_i

t/helper/test-trace2.c:23–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21#define MyError 1
22
23static int get_i(int *p_value, const char *data)
24{
25 char *endptr;
26
27 if (!data || !*data)
28 return MyError;
29
30 errno = 0;
31 *p_value = strtol(data, &endptr, 10);
32 if (*endptr || errno == ERANGE)
33 return MyError;
34
35 return MyOk;
36}
37
38/*
39 * Cause process to exit with the requested value via "return".

Callers 6

ut_001returnFunction · 0.70
ut_002exitFunction · 0.70
ut_100timerFunction · 0.70
ut_101timerFunction · 0.70
ut_200counterFunction · 0.70
ut_201counterFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected