]> code.delx.au - pulseaudio/blobdiff - src/pulsecore/conf-parser.c
remap: Change remapping function argument type from void to int16_t / float as approp...
[pulseaudio] / src / pulsecore / conf-parser.c
index 0c7444d718b5359abf692e2956ff65726e394d80..200252bb7ad567dd2d180395b5f893d36d385cdc 100644 (file)
@@ -130,9 +130,9 @@ static int parse_line(pa_config_parser_state *state) {
                 return -1;
             }
 
-            state->in_proplist = TRUE;
+            state->in_proplist = true;
         } else
-            state->in_proplist = FALSE;
+            state->in_proplist = false;
 
         return 0;
     }
@@ -157,7 +157,7 @@ static int parse_line(pa_config_parser_state *state) {
 /* Go through the file and parse each line */
 int pa_config_parse(const char *filename, FILE *f, const pa_config_item *t, pa_proplist *proplist, void *userdata) {
     int r = -1;
-    pa_bool_t do_close = !f;
+    bool do_close = !f;
     pa_config_parser_state state;
 
     pa_assert(filename);
@@ -185,6 +185,9 @@ int pa_config_parse(const char *filename, FILE *f, const pa_config_item *t, pa_p
 
     while (!feof(f)) {
         if (!fgets(state.buf, sizeof(state.buf), f)) {
+            if (feof(f))
+                break;
+
             pa_log_warn("Failed to read configuration file '%s': %s", filename, pa_cstrerror(errno));
             goto finish;
         }
@@ -265,7 +268,7 @@ int pa_config_parse_size(pa_config_parser_state *state) {
 
 int pa_config_parse_bool(pa_config_parser_state *state) {
     int k;
-    pa_bool_t *b;
+    bool *b;
 
     pa_assert(state);
 
@@ -283,7 +286,7 @@ int pa_config_parse_bool(pa_config_parser_state *state) {
 
 int pa_config_parse_not_bool(pa_config_parser_state *state) {
     int k;
-    pa_bool_t *b;
+    bool *b;
 
     pa_assert(state);