- /* Getting attributes */
- while(l < _lxml->cur)
- {
- if((_lxml->tp[l] == XML_ATTR)&&(_lxml->rl[l] == m)&&
- (_lxml->el[l]) && (_lxml->ct[l]))
- {
- char **tmp;
- tmp = (char**)realloc(ret[k]->attributes, (l-i+1)*sizeof(char*));
- if(tmp == NULL)
- goto fail;
- ret[k]->attributes = tmp;
- ret[k]->attributes[l-i] = NULL;
- tmp = (char**)realloc(ret[k]->values, (l-i+1)*sizeof(char*));
- if(tmp == NULL)
- goto fail;
- ret[k]->values = tmp;
- ret[k]->values[l-i] = NULL;
-
- ret[k]->attributes[l-i-1]=strdup(_lxml->el[l]);
- ret[k]->values[l-i-1] = strdup(_lxml->ct[l]);
- if(!(ret[k]->attributes[l-i-1]) ||
- !(ret[k]->values[l-i-1]))
- goto fail;
- l++;
+ /* Get attributes */
+ while (l < _lxml->cur) {
+ if ((_lxml->tp[l] == XML_ATTR) && (_lxml->rl[l] == m) &&
+ (_lxml->el[l]) && (_lxml->ct[l])) {
+ char **tmp;
+ tmp = (char **)realloc(ret[k]->attributes, (l - i + 1) * sizeof(char *));
+ if (tmp == NULL) {
+ goto fail;