summaryrefslogtreecommitdiffstats
path: root/polyp/conf-parser.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2004-12-11 00:10:41 +0000
committerLennart Poettering <lennart@poettering.net>2004-12-11 00:10:41 +0000
commit73eabece3365c1bb47bf6b009682219c4492fda5 (patch)
tree907b66e2fe29705a512e5f3a240210590b8fe9ba /polyp/conf-parser.c
parent5be9641ffe18c482294c99345306c382ba4cf750 (diff)
* add first part of zeroconf publisher
* bump version to 0.7.1. * improve logging subsystem (introducing log levels) * remove verbose flag on cli * add new API pa_sample_format_to_string() * replace strtol() by usages of pa_atou() and pa_atoi() git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@317 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'polyp/conf-parser.c')
-rw-r--r--polyp/conf-parser.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/polyp/conf-parser.c b/polyp/conf-parser.c
index 35c4766e..b25508e2 100644
--- a/polyp/conf-parser.c
+++ b/polyp/conf-parser.c
@@ -135,17 +135,16 @@ finish:
}
int pa_config_parse_int(const char *filename, unsigned line, const char *lvalue, const char *rvalue, void *data, void *userdata) {
- int *i = data, k;
- char *x = NULL;
+ int *i = data;
+ int32_t k;
assert(filename && lvalue && rvalue && data);
-
- k = strtol(rvalue, &x, 0);
- if (!*rvalue || !x || *x) {
+
+ if (pa_atoi(rvalue, &k) < 0) {
pa_log(__FILE__": [%s:%u] Failed to parse numeric value: %s\n", filename, line, rvalue);
return -1;
}
- *i = k;
+ *i = (int) k;
return 0;
}