summaryrefslogtreecommitdiff
path: root/ares__read_line.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-10-06 07:50:18 (GMT)
committerDaniel Stenberg <daniel@haxx.se>2004-10-06 07:50:18 (GMT)
commit3e748f4b50224e43b916dda5de438c785bdcd49d (patch)
tree53bbfe3dae88be1fd482d3fc392cd1465214f4f3 /ares__read_line.c
parent47bd7d7548103c44b466fceb1dbda425ce8774bc (diff)
downloadc-ares-3e748f4b50224e43b916dda5de438c785bdcd49d.zip
c-ares-3e748f4b50224e43b916dda5de438c785bdcd49d.tar.gz
c-ares-3e748f4b50224e43b916dda5de438c785bdcd49d.tar.bz2
removed tabs and trailing whitespace from source
Diffstat (limited to 'ares__read_line.c')
-rw-r--r--ares__read_line.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/ares__read_line.c b/ares__read_line.c
index 8558557..5a66c63 100644
--- a/ares__read_line.c
+++ b/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;
}