diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2006-06-30 13:28:46 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2006-06-30 13:28:46 +0000 |
commit | 625dac9da817af72bb35414c226dadeb2d915f21 (patch) | |
tree | 6584acdce582dc67c475e29212ca3bae104b3f56 /util.c | |
parent | 86c5d995f6ffb0e2543edef6c652cde2171570df (diff) | |
download | perl-625dac9da817af72bb35414c226dadeb2d915f21.tar.gz |
Fix casting warnings related to snprintf/vsnprintf
p4raw-id: //depot/perl@28459
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; } |