summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/fdio/fdio.c2
-rw-r--r--src/lib/fdio/fdio.h2
-rw-r--r--src/lib/log/torlog.c4
3 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/fdio/fdio.c b/src/lib/fdio/fdio.c
index b622074329..21577e1845 100644
--- a/src/lib/fdio/fdio.c
+++ b/src/lib/fdio/fdio.c
@@ -94,7 +94,7 @@ tor_ftruncate(int fd)
/** Minimal version of write_all, for use by logging. */
int
-write_all_to_fd(int fd, const char *buf, size_t count)
+write_all_to_fd_minimal(int fd, const char *buf, size_t count)
{
size_t written = 0;
raw_assert(count < SSIZE_MAX);
diff --git a/src/lib/fdio/fdio.h b/src/lib/fdio/fdio.h
index 8cc4a04658..0fb3ed1e62 100644
--- a/src/lib/fdio/fdio.h
+++ b/src/lib/fdio/fdio.h
@@ -12,6 +12,6 @@ off_t tor_fd_getpos(int fd);
int tor_fd_setpos(int fd, off_t pos);
int tor_fd_seekend(int fd);
int tor_ftruncate(int fd);
-int write_all_to_fd(int fd, const char *buf, size_t count);
+int write_all_to_fd_minimal(int fd, const char *buf, size_t count);
#endif /* !defined(TOR_FDIO_H) */
diff --git a/src/lib/log/torlog.c b/src/lib/log/torlog.c
index 5709dd8199..b6088d3ebd 100644
--- a/src/lib/log/torlog.c
+++ b/src/lib/log/torlog.c
@@ -346,7 +346,7 @@ log_tor_version(logfile_t *lf, int reset)
tor_snprintf(buf+n, sizeof(buf)-n,
"Tor %s opening %slog file.\n", VERSION, is_new?"new ":"");
}
- if (write_all_to_fd(lf->fd, buf, strlen(buf)) < 0) /* error */
+ if (write_all_to_fd_minimal(lf->fd, buf, strlen(buf)) < 0) /* error */
return -1; /* failed */
return 0;
}
@@ -560,7 +560,7 @@ logfile_deliver(logfile_t *lf, const char *buf, size_t msg_len,
lf->callback(severity, domain, msg_after_prefix);
}
} else {
- if (write_all_to_fd(lf->fd, buf, msg_len) < 0) { /* error */
+ if (write_all_to_fd_minimal(lf->fd, buf, msg_len) < 0) { /* error */
/* don't log the error! mark this log entry to be blown away, and
* continue. */
lf->seems_dead = 1;