| 21 | #define MyError 1 |
| 22 | |
| 23 | static 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". |
no outgoing calls
no test coverage detected