summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorLukas Mai <l.mai@web.de>2016-01-31 00:16:53 +0100
committerLukas Mai <l.mai@web.de>2016-01-31 00:16:53 +0100
commit52039d8f773b12b343fefe32df55d65fbde0424d (patch)
treeb35d8b31c8fa099b025e45eda0e91a6e22c0c28b /util.c
parent4f3e04fd00ec110463294220e80bbf405b50c3ff (diff)
downloadperl-52039d8f773b12b343fefe32df55d65fbde0424d.tar.gz
util.c: fix/simplify unused arg logic in my_vsnprintf
Diffstat (limited to 'util.c')
-rw-r--r--util.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/util.c b/util.c
index 7c42a1aa8c..7cd7d0e930 100644
--- a/util.c
+++ b/util.c
@@ -5270,13 +5270,11 @@ Perl_my_vsnprintf(char *buffer, const Size_t len, const char *format, va_list ap
va_list apc;
PERL_ARGS_ASSERT_MY_VSNPRINTF;
-#ifndef HAS_VSNPRINTF
- PERL_UNUSED_VAR(len);
-#endif
Perl_va_copy(ap, apc);
# ifdef HAS_VSNPRINTF
retval = vsnprintf(buffer, len, format, apc);
# else
+ PERL_UNUSED_ARG(len);
retval = vsprintf(buffer, format, apc);
# endif
va_end(apc);
@@ -5284,6 +5282,7 @@ Perl_my_vsnprintf(char *buffer, const Size_t len, const char *format, va_list ap
# ifdef HAS_VSNPRINTF
retval = vsnprintf(buffer, len, format, ap);
# else
+ PERL_UNUSED_ARG(len);
retval = vsprintf(buffer, format, ap);
# endif
#endif /* #ifdef NEED_VA_COPY */