]> andersk Git - splint.git/blobdiff - src/cstring.c
Fixed inclusion problems with osd.h.
[splint.git] / src / cstring.c
index 4c9f2c05cd548aa6679f82e8c0b81348b573d606..eeb5f2b89b497ee8b144cb68b3c7dc039dfe4e02 100644 (file)
@@ -34,7 +34,6 @@
 # include "splintMacros.nf"
 # include "basic.h"
 # include "osd.h"
-# include "portab.h"
 
 /*@only@*/ /*@notnull@*/ 
 cstring cstring_newEmpty (void)
@@ -953,7 +952,8 @@ static mstring doMergeString (cstring s)
              retPtr++;
              *retPtr = '\0';
              BADEXIT;
-             return ret;
+
+             /*@notreached@*/ return ret;
            }
          else
            {
@@ -969,7 +969,7 @@ static mstring doMergeString (cstring s)
       ptr++;
       
     }/* end while */
-  retPtr = '\0';
+  *retPtr = '\0';
   return ret;
 }
 
@@ -1111,7 +1111,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.068701 seconds and 4 git commands to generate.