summaryrefslogtreecommitdiff
path: root/lib/util/rdsvc.c
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@tele2.at>2018-09-16 01:12:06 +0200
committerDavid Oberhollenzer <david.oberhollenzer@tele2.at>2018-09-16 01:12:06 +0200
commit481744a2ba4d9b795918d3bc0767321e05e10bbd (patch)
tree8b83d43aff0e35f565fca981d324ef2cff203e8d /lib/util/rdsvc.c
parent5b78d4d695cf0f0eb09e2ee3c96be31250611534 (diff)
Move splitkv function to libcfg
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
Diffstat (limited to 'lib/util/rdsvc.c')
-rw-r--r--lib/util/rdsvc.c27
1 files changed, 0 insertions, 27 deletions
diff --git a/lib/util/rdsvc.c b/lib/util/rdsvc.c
index 37c7ba0..3e146a2 100644
--- a/lib/util/rdsvc.c
+++ b/lib/util/rdsvc.c
@@ -226,33 +226,6 @@ static const struct svc_param {
{ "after", 0, RDSVC_NO_DEPS, svc_after },
};
-static int splitkv(rdline_t *rd, char **k, char **v)
-{
- char *key = rd->buffer, *value = rd->buffer;
-
- while (*value != ' ' && *value != '\0') {
- if (!isalpha(*value)) {
- fprintf(stderr,
- "%s: %zu: unexpected '%c' in keyword\n",
- rd->filename, rd->lineno, *value);
- return -1;
- }
- ++value;
- }
-
- if (*value != ' ') {
- fprintf(stderr, "%s: %zu: expected argument after '%s'\n",
- rd->filename, rd->lineno, key);
- return -1;
- }
-
- *(value++) = '\0';
-
- *k = key;
- *v = value;
- return 0;
-}
-
static const struct svc_param *find_param(rdline_t *rd, const char *name)
{
size_t i;