summaryrefslogtreecommitdiff
path: root/ares/ares__read_line.c
diff options
context:
space:
mode:
Diffstat (limited to 'ares/ares__read_line.c')
-rw-r--r--ares/ares__read_line.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/ares/ares__read_line.c b/ares/ares__read_line.c
index 8558557fa..5a66c63ba 100644
--- a/ares/ares__read_line.c
+++ b/ares/ares__read_line.c
@@ -38,26 +38,26 @@ int ares__read_line(FILE *fp, char **buf, int *bufsize)
{
*buf = malloc(128);
if (!*buf)
- return ARES_ENOMEM;
+ return ARES_ENOMEM;
*bufsize = 128;
}
while (1)
{
if (!fgets(*buf + offset, *bufsize - (int)offset, fp))
- return (offset != 0) ? 0 : (ferror(fp)) ? ARES_EFILE : ARES_EOF;
+ return (offset != 0) ? 0 : (ferror(fp)) ? ARES_EFILE : ARES_EOF;
len = offset + strlen(*buf + offset);
if ((*buf)[len - 1] == '\n')
- {
- (*buf)[len - 1] = 0;
- return ARES_SUCCESS;
- }
+ {
+ (*buf)[len - 1] = 0;
+ return ARES_SUCCESS;
+ }
offset = len;
/* Allocate more space. */
newbuf = realloc(*buf, *bufsize * 2);
if (!newbuf)
- return ARES_ENOMEM;
+ return ARES_ENOMEM;
*buf = newbuf;
*bufsize *= 2;
}