summaryrefslogtreecommitdiff
path: root/src/plugins/scripts/perl/weechat-perl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/scripts/perl/weechat-perl.c')
-rw-r--r--src/plugins/scripts/perl/weechat-perl.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/plugins/scripts/perl/weechat-perl.c b/src/plugins/scripts/perl/weechat-perl.c
index 03862048a..dd278b1f2 100644
--- a/src/plugins/scripts/perl/weechat-perl.c
+++ b/src/plugins/scripts/perl/weechat-perl.c
@@ -110,19 +110,20 @@ weechat_perl_exec (struct t_plugin_script *script,
char *func;
unsigned int count;
void *ret_value;
- int *ret_i, mem_err;
+ int *ret_i, mem_err, length;
SV *ret_s;
/* this code is placed here to conform ISO C90 */
dSP;
#ifndef MULTIPLICITY
- int size = strlen (script->interpreter) + strlen(function) + 3;
- func = (char *)malloc (size * sizeof(char));
+ int length = strlen (script->interpreter) + strlen (function) + 3;
+ func = (char *)malloc (length * sizeof(char));
if (!func)
return NULL;
- snprintf (func, size, "%s::%s", (char *) script->interpreter, function);
+ snprintf (func, length, "%s::%s", (char *) script->interpreter, function);
#else
+ (void) length;
func = function;
PERL_SET_CONTEXT (script->interpreter);
#endif