MCPcopy Create free account
hub / github.com/RedisGraph/RedisGraph / _Config_ParseInteger

Function _Config_ParseInteger

src/configuration/config.c:107–118  ·  view source on GitHub ↗

parse integer return true if string represents an integer

Source from the content-addressed store, hash-verified

105// parse integer
106// return true if string represents an integer
107static inline bool _Config_ParseInteger
108(
109 const char *integer_str,
110 long long *value
111) {
112 char *endptr;
113 errno = 0; // To distinguish success/failure after call
114 *value = strtoll(integer_str, &endptr, 10);
115
116 // Return an error code if integer parsing fails.
117 return (errno == 0 && endptr != integer_str && *endptr == '\0');
118}
119
120// parse positive integer
121// return true if string represents a positive integer > 0

Callers 3

Config_Option_setFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected