X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=lttv%2Flttv%2Fattribute.c;h=7eeac1243491a5660563c82f7daa570dc6496237;hb=bdddf3f5bfa75ca47e494b7510fda7cefbb6e093;hp=243fe0240d1286d9e85598233d0708c7e7b82d55;hpb=6b1f0e27f35150ee49c5d18fa5e5a0e298d24369;p=lttv.git diff --git a/lttv/lttv/attribute.c b/lttv/lttv/attribute.c index 243fe024..7eeac124 100644 --- a/lttv/lttv/attribute.c +++ b/lttv/lttv/attribute.c @@ -487,13 +487,15 @@ lttv_attribute_read_xml(LttvAttribute *self, FILE *fp) LttvAttribute *subtree; - fscanf(fp,""); + res = fscanf(fp, ""); + g_assert(res > 0); while(1) { res = fscanf(fp, "]", buffer, type); g_assert(res == 2); name = g_quark_from_string(buffer); if(strcmp(type, "ATTRS") == 0) { - fscanf(fp, ">"); + res = fscanf(fp, ">"); + g_assert(res > 0); subtree = lttv_attribute_find_subdir(self, name); lttv_attribute_read_xml(subtree, fp); } @@ -553,11 +555,13 @@ lttv_attribute_read_xml(LttvAttribute *self, FILE *fp) } else if(strcmp(type, "NONE") == 0) { value = lttv_attribute_add(self, name, LTTV_NONE); - fscanf(fp, "/>"); + res = fscanf(fp, "/>"); + g_assert(res > 0); } else g_error("Unknown type to read"); } - fscanf(fp,""); + res = fscanf(fp, ""); + g_assert(res > 0); } static LttvAttribute *