Remove dead code and unexport some calls

"make check-api-unused" informs us about code that is not used anymore
or that is exported but only used internally. Fix these all over the
place.
This commit is contained in:
Lennart Poettering
2013-11-08 18:12:45 +01:00
parent f842cd74ea
commit 9588bc3209
22 changed files with 98 additions and 318 deletions
-31
View File
@@ -517,37 +517,6 @@ int config_parse_bool(const char* unit,
return 0;
}
int config_parse_tristate(const char *unit,
const char *filename,
unsigned line,
const char *section,
const char *lvalue,
int ltype,
const char *rvalue,
void *data,
void *userdata) {
int k;
int *b = data;
assert(filename);
assert(lvalue);
assert(rvalue);
assert(data);
/* Tristates are like booleans, but can also take the 'default' value, i.e. "-1" */
k = parse_boolean(rvalue);
if (k < 0) {
log_syntax(unit, LOG_ERR, filename, line, -k,
"Failed to parse boolean value, ignoring: %s", rvalue);
return 0;
}
*b = !!k;
return 0;
}
int config_parse_string(const char *unit,
const char *filename,
unsigned line,