]> andersk Git - splint.git/commitdiff
Cleaned up code in doMergeString
authordrl7x <drl7x>
Fri, 11 Apr 2003 19:17:59 +0000 (19:17 +0000)
committerdrl7x <drl7x>
Fri, 11 Apr 2003 19:17:59 +0000 (19:17 +0000)
src/cstring.c

index 4c9f2c05cd548aa6679f82e8c0b81348b573d606..90d0c17b20d2d965e9b8293570cb40591e62308b 100644 (file)
@@ -953,7 +953,8 @@ static mstring doMergeString (cstring s)
              retPtr++;
              *retPtr = '\0';
              BADEXIT;
-             return ret;
+
+             /*@notreached@*/ return ret;
            }
          else
            {
@@ -969,7 +970,7 @@ static mstring doMergeString (cstring s)
       ptr++;
       
     }/* end while */
-  retPtr = '\0';
+  *retPtr = '\0';
   return ret;
 }
 
@@ -1111,7 +1112,8 @@ static mstring doExpandEscapes (cstring s, /*@out@*/ size_t *len)
   /* add the null character */
   *retPtr = '\0';
 
-  *len = retPtr - ret;
+  llassert(  (retPtr-ret) >= 0 );
+  *len = (size_t)(retPtr - ret);
   return ret;
 }
 
This page took 0.083124 seconds and 5 git commands to generate.