aboutsummaryrefslogtreecommitdiff
path: root/src/memline.c
diff options
context:
space:
mode:
authorEliseo Martínez <eliseomarmol@gmail.com>2014-04-20 14:32:07 +0200
committerThiago de Arruda <tpadilha84@gmail.com>2014-04-23 06:56:32 -0300
commit3f8061f16c820d32d87f2b608c292ae4d9fb0415 (patch)
treea4dec777982a9659539d3a510c02516cbb2dc0c3 /src/memline.c
parentc049cb2b5103d1f9c71b9b90a197bf17205867a2 (diff)
downloadrneovim-3f8061f16c820d32d87f2b608c292ae4d9fb0415.tar.gz
rneovim-3f8061f16c820d32d87f2b608c292ae4d9fb0415.tar.bz2
rneovim-3f8061f16c820d32d87f2b608c292ae4d9fb0415.zip
Use portable format specifiers: Case %ld - plain - vim_snprintf.
Fix uses of plain "%ld" within vim_snprintf(): - Replace "%ld" with "%" PRId64. - Cast corresponding argument to (int64_t).
Diffstat (limited to 'src/memline.c')
-rw-r--r--src/memline.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/memline.c b/src/memline.c
index ac6a16f807..89085745a1 100644
--- a/src/memline.c
+++ b/src/memline.c
@@ -4263,12 +4263,13 @@ static void ml_crypt_prepare(memfile_T *mfp, off_t offset, int reading)
use_crypt_method = method; /* select pkzip or blowfish */
if (method == 0) {
- vim_snprintf((char *)salt, sizeof(salt), "%s%ld", key, (long)offset);
+ vim_snprintf((char *)salt, sizeof(salt), "%s%" PRId64 "",
+ key, (int64_t)offset);
crypt_init_keys(salt);
} else {
/* Using blowfish, add salt and seed. We use the byte offset of the
* block for the salt. */
- vim_snprintf((char *)salt, sizeof(salt), "%ld", (long)offset);
+ vim_snprintf((char *)salt, sizeof(salt), "%" PRId64, (int64_t)offset);
bf_key_init(key, salt, (int)STRLEN(salt));
bf_cfb_init(seed, MF_SEED_LEN);
}