aboutsummaryrefslogtreecommitdiff
path: root/src/or/keypin.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/keypin.c')
-rw-r--r--src/or/keypin.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/keypin.c b/src/or/keypin.c
index 8e1ef099a4..8100f3b734 100644
--- a/src/or/keypin.c
+++ b/src/or/keypin.c
@@ -309,7 +309,7 @@ keypin_open_journal(const char *fname)
char tbuf[ISO_TIME_LEN+1];
format_iso_time(tbuf, approx_time());
tor_snprintf(buf, sizeof(buf), "@opened-at %s\n", tbuf);
- if (write_all(fd, buf, strlen(buf), 0) < 0)
+ if (write_all_to_fd(fd, buf, strlen(buf)) < 0)
goto err;
keypin_journal_fd = fd;
@@ -348,7 +348,7 @@ keypin_journal_append_entry(const uint8_t *rsa_id_digest,
(const char*)ed25519_id_key);
line[BASE64_DIGEST_LEN+1+BASE64_DIGEST256_LEN] = '\n';
- if (write_all(keypin_journal_fd, line, JOURNAL_LINE_LEN, 0)<0) {
+ if (write_all_to_fd(keypin_journal_fd, line, JOURNAL_LINE_LEN)<0) {
log_warn(LD_DIRSERV, "Error while adding a line to the key-pinning "
"journal: %s", strerror(errno));
keypin_close_journal();