aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Frank Denis <github@pureftpd.org>2017-12-30 14:13:19 +0100
committerGravatar Frank Denis <github@pureftpd.org>2017-12-30 14:13:19 +0100
commit382e1f6c4c71fa0b1b6354eac38d4819937ef39e (patch)
treed0b4746408d427c83c0b07dbdb5e0d023f1dbe26 /src
parenta39c3d84ef2c810e06cfb1416ac0e6cadc41200c (diff)
downloadtweetpipe-382e1f6c4c71fa0b1b6354eac38d4819937ef39e.tar.gz
Don't bother with extra casts
Diffstat (limited to 'src')
-rw-r--r--src/encpipe.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/encpipe.c b/src/encpipe.c
index 676b9e3..88cbd24 100644
--- a/src/encpipe.c
+++ b/src/encpipe.c
@@ -106,8 +106,8 @@ stream_encrypt(Context *ctx)
0) {
die(0, "Encryption error");
}
- if (safe_write(ctx->fd_out, chunk_size_p,
- 4 + hydro_secretbox_HEADERBYTES + (size_t) chunk_size, -1) < 0) {
+ if (safe_write(ctx->fd_out, chunk_size_p, 4 + hydro_secretbox_HEADERBYTES + chunk_size,
+ -1) < 0) {
die(1, "write()");
}
if (chunk_size == 0) {
@@ -140,7 +140,7 @@ stream_decrypt(Context *ctx)
if (chunk_size > max_chunk_size) {
die(0, "Chunk size too large ([%zd] > [%zd])", chunk_size, max_chunk_size);
}
- if (safe_read(ctx->fd_in, chunk, (size_t) chunk_size + hydro_secretbox_HEADERBYTES) !=
+ if (safe_read(ctx->fd_in, chunk, chunk_size + hydro_secretbox_HEADERBYTES) !=
chunk_size + hydro_secretbox_HEADERBYTES) {
die(0, "Chunk too short ([%zd] bytes expected)", chunk_size);
}