summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-06-30 13:28:46 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-06-30 13:28:46 +0000
commit625dac9da817af72bb35414c226dadeb2d915f21 (patch)
tree6584acdce582dc67c475e29212ca3bae104b3f56 /util.c
parent86c5d995f6ffb0e2543edef6c652cde2171570df (diff)
downloadperl-625dac9da817af72bb35414c226dadeb2d915f21.tar.gz
Fix casting warnings related to snprintf/vsnprintf
p4raw-id: //depot/perl@28459
Diffstat (limited to 'util.c')
-rw-r--r--util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/util.c b/util.c
index 07dd4d4650..cecec9c878 100644
--- a/util.c
+++ b/util.c
@@ -5393,7 +5393,7 @@ Perl_my_snprintf(char *buffer, const Size_t len, const char *format, ...)
#endif
va_end(ap);
/* vsnprintf() shows failure with >= len, vsprintf() with < 0 */
- if (retval < 0 || (len > 0 && retval >= len))
+ if (retval < 0 || (len > 0 && (Size_t)retval >= len))
Perl_croak(aTHX_ "panic: my_snprintf buffer overflow");
return retval;
}
@@ -5430,7 +5430,7 @@ Perl_my_vsnprintf(char *buffer, const Size_t len, const char *format, va_list ap
# endif
#endif /* #ifdef NEED_VA_COPY */
/* vsnprintf() shows failure with >= len, vsprintf() with < 0 */
- if (retval < 0 || (len > 0 && retval >= len))
+ if (retval < 0 || (len > 0 && (Size_t)retval >= len))
Perl_croak(aTHX_ "panic: my_vsnprintf buffer overflow");
return retval;
}