aboutsummaryrefslogtreecommitdiff
path: root/src/ops.c
diff options
context:
space:
mode:
authorEliseo Martínez <eliseomarmol@gmail.com>2014-04-22 20:56:13 +0200
committerThiago de Arruda <tpadilha84@gmail.com>2014-04-23 06:56:33 -0300
commit357f54f33119e50142ecbced0e36907586af2a49 (patch)
tree3ac8b539a5b57113f43f155bf05d29e5c6ad0f79 /src/ops.c
parentb9c550ebd5ce5d3f37ca6bab7657be1b3fba6697 (diff)
downloadrneovim-357f54f33119e50142ecbced0e36907586af2a49.tar.gz
rneovim-357f54f33119e50142ecbced0e36907586af2a49.tar.bz2
rneovim-357f54f33119e50142ecbced0e36907586af2a49.zip
Use portable format specifiers: Case %l[uoxX] - plain - sprintf.
Fix uses of plain "%lu", "%lo", "%lx" and "%lX" within sprintf(): - Replace "%l<whatever>" with "%" PRI<whatever>64. - Cast corresponding argument to (uint64_t).
Diffstat (limited to 'src/ops.c')
-rw-r--r--src/ops.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ops.c b/src/ops.c
index bf5508664a..97ae3142b8 100644
--- a/src/ops.c
+++ b/src/ops.c
@@ -4451,13 +4451,13 @@ int do_addsub(int command, linenr_T Prenum1)
* Put the number characters in buf2[].
*/
if (hex == 0)
- sprintf((char *)buf2, "%lu", n);
+ sprintf((char *)buf2, "%" PRIu64, (uint64_t)n);
else if (hex == '0')
- sprintf((char *)buf2, "%lo", n);
+ sprintf((char *)buf2, "%" PRIo64, (uint64_t)n);
else if (hex && hexupper)
- sprintf((char *)buf2, "%lX", n);
+ sprintf((char *)buf2, "%" PRIX64, (uint64_t)n);
else
- sprintf((char *)buf2, "%lx", n);
+ sprintf((char *)buf2, "%" PRIx64, (uint64_t)n);
length -= (int)STRLEN(buf2);
/*