summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--util.c15
-rw-r--r--xml.h3
2 files changed, 10 insertions, 8 deletions
diff --git a/util.c b/util.c
index 14dedc6..b6c5fd2 100644
--- a/util.c
+++ b/util.c
@@ -69,7 +69,8 @@ parseline(char **line, size_t *size, char **fields,
prev = s + 1;
}
fields[i] = prev;
- for(i++; i < maxfields; i++) /* make non-parsed fields empty. */
+ /* make non-parsed fields empty. */
+ for(i++; i < maxfields; i++)
fields[i] = "";
}
return i;
@@ -101,10 +102,10 @@ void
printutf8pad(FILE *fp, const char *s, size_t len, int pad)
{
wchar_t w;
- size_t n = 0, i;
+ size_t n = 0, i;
int r;
- for(i = 0; *s && n < len; i++, s++) {
+ for(i = 0; *s && n < len; i++, s++) {
if(ISUTF8(*s)) {
if((r = mbtowc(&w, s, 4)) == -1)
break;
@@ -112,8 +113,8 @@ printutf8pad(FILE *fp, const char *s, size_t len, int pad)
r = 1;
n += (size_t)r;
}
- putc(*s, fp);
- }
- for(; n < len; n++)
- putc(pad, fp);
+ putc(*s, fp);
+ }
+ for(; n < len; n++)
+ putc(pad, fp);
}
diff --git a/xml.h b/xml.h
index 147f363..5f72494 100644
--- a/xml.h
+++ b/xml.h
@@ -37,7 +37,8 @@ typedef struct xmlparser {
char data[BUFSIZ]; /* data buffer used for tag and attribute data */
size_t readoffset;
size_t readlastbytes;
- unsigned char readbuf[BUFSIZ]; /* read buffer used by xmlparser_getnext */
+ /* read buffer used by xmlparser_getnext */
+ unsigned char readbuf[BUFSIZ];
} XMLParser;
void xmlparser_init(XMLParser *, FILE *);