MCPcopy Index your code
hub / github.com/RsyncProject/rsync / poptParseInteger

Function poptParseInteger

popt/popt.c:1081–1096  ·  view source on GitHub ↗

* Parse an integer expression. * @retval *llp integer expression value * @param argInfo integer expression type * @param val integer expression string * @return 0 on success, otherwise POPT_* error. */

Source from the content-addressed store, hash-verified

1079 * @return 0 on success, otherwise POPT_* error.
1080 */
1081static int poptParseInteger(long long * llp,
1082 UNUSED(unsigned int argInfo),
1083 const char * val)
1084{
1085 if (val) {
1086 char *end = NULL;
1087 *llp = strtoll(val, &end, 0);
1088
1089 /* XXX parse scaling suffixes here. */
1090
1091 if (!(end && *end == '\0'))
1092 return POPT_ERROR_BADNUMBER;
1093 } else
1094 *llp = 0;
1095 return 0;
1096}
1097
1098/**
1099 * Save the option argument through the (*opt->arg) pointer.

Callers 1

poptSaveArgFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected