diff options
author | Thiago de Arruda <tpadilha84@gmail.com> | 2014-05-20 08:31:19 -0300 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2014-05-20 08:31:19 -0300 |
commit | 0aa8b5828cc0674894681841f40c3c05bfd2f07b (patch) | |
tree | 1a14dcf2a4aa6c5276a4ea7802f4cbe576e9a6e3 /src/nvim/memfile.c | |
parent | 32d018b57edbc75d6a70c5cd3e8012d7f924f460 (diff) | |
parent | 85338fe1d5a56f82546e16c305c2048c081771e0 (diff) | |
download | rneovim-0aa8b5828cc0674894681841f40c3c05bfd2f07b.tar.gz rneovim-0aa8b5828cc0674894681841f40c3c05bfd2f07b.tar.bz2 rneovim-0aa8b5828cc0674894681841f40c3c05bfd2f07b.zip |
Merge pull request #699 'Remove cryptography'
Diffstat (limited to 'src/nvim/memfile.c')
-rw-r--r-- | src/nvim/memfile.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/src/nvim/memfile.c b/src/nvim/memfile.c index 77468bb855..bf40d27502 100644 --- a/src/nvim/memfile.c +++ b/src/nvim/memfile.c @@ -132,7 +132,6 @@ memfile_T *mf_open(char_u *fname, int flags) mf_hash_init(&mfp->mf_hash); mf_hash_init(&mfp->mf_trans); mfp->mf_page_size = MEMFILE_PAGE_SIZE; - mfp->mf_old_key = NULL; /* * Try to set the page size equal to the block size of the device. @@ -814,10 +813,6 @@ static int mf_read(memfile_T *mfp, bhdr_T *hp) return FAIL; } - /* Decrypt if 'key' is set and this is a data block. */ - if (*mfp->mf_buffer->b_p_key != NUL) - ml_decrypt_data(mfp, hp->bh_data, offset, size); - return OK; } @@ -894,7 +889,6 @@ static int mf_write(memfile_T *mfp, bhdr_T *hp) /* * Write block "hp" with data size "size" to file "mfp->mf_fd". - * Takes care of encryption. * Return FAIL or OK. */ static int mf_write_block(memfile_T *mfp, bhdr_T *hp, off_t offset, unsigned size) @@ -902,17 +896,9 @@ static int mf_write_block(memfile_T *mfp, bhdr_T *hp, off_t offset, unsigned siz char_u *data = hp->bh_data; int result = OK; - /* Encrypt if 'key' is set and this is a data block. */ - if (*mfp->mf_buffer->b_p_key != NUL) { - data = ml_encrypt_data(mfp, data, offset, size); - } - if ((unsigned)write_eintr(mfp->mf_fd, data, size) != size) result = FAIL; - if (data != hp->bh_data) - free(data); - return result; } |