embryo_cc - make assert clearer
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>
Thu, 14 Aug 2014 09:55:02 +0000 (18:55 +0900)
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>
Thu, 14 Aug 2014 09:55:02 +0000 (18:55 +0900)
this fixes coverity warning CID 1039730

src/bin/embryo/embryo_cc_sc2.c

index ed6e417..b63354f 100644 (file)
@@ -2700,8 +2700,9 @@ addvariable(char *name, cell addr, int ident, int vclass, int tag,
    symbol             *sym, *parent, *top;
    int                 level;
 
+   sym = findglb(name);
    /* global variables may only be defined once */
-   assert(vclass != sGLOBAL || (sym = findglb(name)) == NULL
+   assert(vclass != sGLOBAL || sym  == NULL
          || (sym->usage & uDEFINE) == 0);
 
    if (ident == iARRAY || ident == iREFARRAY)