]> andersk Git - splint.git/blobdiff - src/globalsClause.c
Fixed all /*@i...@*/ tags (except 1).
[splint.git] / src / globalsClause.c
index b73dbfbdfa70e36928040d7b2f0ee94d511dda0c..a0c9fca6a33d18a39a1b712592ebc81fd0b95fd6 100644 (file)
@@ -1,6 +1,6 @@
 /*
 ** Splint - annotation-assisted static program checker
-** Copyright (C) 1994-2002 University of Virginia,
+** Copyright (C) 1994-2003 University of Virginia,
 **         Massachusetts Institute of Technology
 **
 ** This program is free software; you can redistribute it and/or modify it
 ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
 ** MA 02111-1307, USA.
 **
-** For information on lclint: lclint-request@cs.virginia.edu
-** To report a bug: lclint-bug@cs.virginia.edu
+** For information on splint: info@splint.org
+** To report a bug: splint-bug@splint.org
 ** For more information: http://www.splint.org
 */
 /*
 ** globalsClause.c
 */
 
-# include "lclintMacros.nf"
+# include "splintMacros.nf"
 # include "basic.h"
 
 extern globalsClause 
@@ -33,8 +33,9 @@ globalsClause_create (lltok tok, globSet gl)
 {
   globalsClause res = (globalsClause) dmalloc (sizeof (*res));
   res->globs = gl;
-  res->loc = lltok_stealLoc (tok);
-  /*@i423@*/ return res; /* releases doesn't seem to work right here... */
+  res->loc = fileloc_copy (lltok_getLoc (tok));
+  lltok_free (tok); 
+  return res; /* releases doesn't seem to work right here... */
 }
 
 globSet globalsClause_getGlobs (globalsClause gclause)
@@ -51,6 +52,11 @@ globSet globalsClause_takeGlobs (globalsClause gclause)
 
 extern void globalsClause_free (globalsClause gclause)
 {
+  if (gclause == NULL)
+    {
+      return; /* shouldn't ever need this? */
+    }
+
   globSet_free (gclause->globs);
   sfree (gclause);
 }
This page took 0.037256 seconds and 4 git commands to generate.