summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorAndy Lester <andy@petdance.com>2005-12-30 17:05:58 -0600
committerH.Merijn Brand <h.m.brand@xs4all.nl>2006-01-01 10:42:16 +0000
commitcbbf89328f29f925842d180c1410e324b297744d (patch)
tree6f63c59aeb96d4eaafa9b8f1ee25b94fd72730c3 /sv.c
parent359842a5ea25b12844b1a94485cc2aa186d8bdbe (diff)
downloadperl-cbbf89328f29f925842d180c1410e324b297744d.tar.gz
Making 0 pointers to NULLs
Message-ID: <20051231050558.GA29093@petdance.com> p4raw-id: //depot/perl@26558
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/sv.c b/sv.c
index b707a73bfd..cb3e193475 100644
--- a/sv.c
+++ b/sv.c
@@ -3085,7 +3085,7 @@ Perl_sv_setsv_flags(pTHX_ SV *dstr, register SV *sstr, I32 flags)
if (dtype >= SVt_PV) {
if (dtype == SVt_PVGV) {
SV * const sref = SvREFCNT_inc(SvRV(sstr));
- SV *dref = 0;
+ SV *dref = NULL;
const int intro = GvINTRO(dstr);
#ifdef GV_UNIQUE_CHECK
@@ -5197,15 +5197,13 @@ Perl_sv_pos_u2b(pTHX_ register SV *sv, I32* offsetp, I32* lenp)
start = (U8*)SvPV_const(sv, len);
if (len) {
STRLEN boffset = 0;
- STRLEN *cache = 0;
+ STRLEN *cache = NULL;
const U8 *s = start;
I32 uoffset = *offsetp;
const U8 * const send = s + len;
- MAGIC *mg = 0;
- bool found = FALSE;
+ MAGIC *mg = NULL;
+ bool found = utf8_mg_pos(sv, &mg, &cache, 0, offsetp, *offsetp, &s, start, send);
- if (utf8_mg_pos(sv, &mg, &cache, 0, offsetp, *offsetp, &s, start, send))
- found = TRUE;
if (!found && uoffset > 0) {
while (s < send && uoffset--)
s += UTF8SKIP(s);
@@ -5955,7 +5953,7 @@ thats_really_all_folks:
{
/*The big, slow, and stupid way. */
#ifdef USE_HEAP_INSTEAD_OF_STACK /* Even slower way. */
- STDCHAR *buf = 0;
+ STDCHAR *buf = NULL;
Newx(buf, 8192, STDCHAR);
assert(buf);
#else
@@ -9528,7 +9526,7 @@ Perl_sv_dup(pTHX_ const SV *sstr, CLONE_PARAMS* param)
break;
case SVt_PVHV:
{
- HEK *hvname = 0;
+ HEK *hvname = NULL;
if (HvARRAY((HV*)sstr)) {
STRLEN i = 0;