| 1110 | } |
| 1111 | |
| 1112 | char *u64_option(const char *arg, u64 *i) |
| 1113 | { |
| 1114 | char *endp; |
| 1115 | |
| 1116 | /* This is how the manpage says to do it. Yech. */ |
| 1117 | errno = 0; |
| 1118 | *i = strtol(arg, &endp, 0); |
| 1119 | if (*endp || !arg[0]) |
| 1120 | return tal_fmt(NULL, "'%s' is not a number", arg); |
| 1121 | if (errno) |
| 1122 | return tal_fmt(NULL, "'%s' is out of range", arg); |
| 1123 | return NULL; |
| 1124 | } |
| 1125 | |
| 1126 | char *u32_option(const char *arg, u32 *i) |
| 1127 | { |
no outgoing calls
no test coverage detected