[patch] comment grammar and indentation, spurious tab
[p5sagit/p5-mst-13.2.git] / sv.c
diff --git a/sv.c b/sv.c
index 5372215..016cad5 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -1,7 +1,7 @@
 /*    sv.c
  *
  *    Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- *    2000, 2001, 2002, 2003, 2004, 2005, by Larry Wall and others
+ *    2000, 2001, 2002, 2003, 2004, 2005, 2006, by Larry Wall and others
  *
  *    You may distribute under the terms of either the GNU General Public
  *    License or the Artistic License, as specified in the README file.
@@ -125,7 +125,7 @@ following functions (specified as [function that calls visit()] / [function
 called by visit() for each SV]):
 
     sv_report_used() / do_report_used()
-                       dump all remaining SVs (debugging aid)
+                       dump all remaining SVs (debugging aid)
 
     sv_clean_objs() / do_clean_objs(),do_clean_named_objs()
                        Attempt to free all objects pointed to by RVs,
@@ -1123,14 +1123,14 @@ Perl_sv_upgrade(pTHX_ register SV *sv, U32 new_type)
        }
 
 #ifndef NV_ZERO_IS_ALLBITS_ZERO
-    /* If NV 0.0 is store as all bits 0 then Zero() already creates a correct
-       0.0 for us.  */
+       /* If NV 0.0 is stores as all bits 0 then Zero() already creates a
+        * correct 0.0 for us. */
        if (old_type_details->zero_nv)
            SvNV_set(sv, 0);
 #endif
 
        if (new_type == SVt_PVIO)
-           IoPAGE_LEN(sv)      = 60;
+           IoPAGE_LEN(sv) = 60;
        if (old_type < SVt_RV)
            SvPV_set(sv, 0);
        break;
@@ -1727,7 +1727,7 @@ S_sv_2iuv_common(pTHX_ SV *sv) {
        } else if (SvTYPE(sv) < SVt_PVNV)
            sv_upgrade(sv, SVt_PVNV);
 
-       /* If NV preserves UV then we only use the UV value if we know that
+       /* If NVs preserve UVs then we only use the UV value if we know that
           we aren't going to call atof() below. If NVs don't preserve UVs
           then the value returned may have more precision than atof() will
           return, even though value isn't perfectly accurate.  */
@@ -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;
@@ -10480,7 +10478,7 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags,
        PL_exitlist     = (PerlExitListEntry*)NULL;
 
     PL_my_cxt_size = proto_perl->Imy_cxt_size;
-    if (PL_my_cxt_size != -1) {
+    if (PL_my_cxt_size) {
        Newx(PL_my_cxt_list, PL_my_cxt_size, void *);
        Copy(proto_perl->Imy_cxt_list, PL_my_cxt_list, PL_my_cxt_size, void *);
     }