changeset 28645:0813367c7810

(xmalloc, xrealloc): Rewritten. (declaration): Remove parameter IS_EXTERN. (class_definition): Remove unused variable.
author Gerd Moellmann <gerd@gnu.org>
date Wed, 19 Apr 2000 14:30:52 +0000
parents e7b7d7bf46ef
children 61ea94b6ee1f
files lib-src/ebrowse.c
diffstat 1 files changed, 16 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/lib-src/ebrowse.c	Wed Apr 19 13:04:59 2000 +0000
+++ b/lib-src/ebrowse.c	Wed Apr 19 14:30:52 2000 +0000
@@ -498,7 +498,7 @@
 void member P_ ((struct sym *, int));
 void class_body P_ ((struct sym *, int));
 void class_definition P_ ((struct sym *, int, int, int));
-void declaration P_ ((int, int));
+void declaration P_ ((int));
 unsigned parm_list P_ ((int *));
 char *operator_name P_ ((int *));
 struct sym *parse_classname P_ ((void));
@@ -534,10 +534,12 @@
      int nbytes;
 {
   void *p = malloc (nbytes);
-  if (p)
-    return p;
-  yyerror ("out of memory");
-  exit (1);
+  if (p == NULL)
+    {
+      yyerror ("out of memory");
+      exit (1);
+    }
+  return p;
 }
 
 
@@ -549,10 +551,12 @@
      int sz;
 {
   p = realloc (p, sz);
-  if (p)
-    return p;
-  yyerror ("out of memory");
-  exit (1);
+  if (p == NULL)
+    {
+      yyerror ("out of memory");
+      exit (1);
+    }
+  return p;
 }
 
 
@@ -2931,7 +2935,6 @@
      int flags;
      int nested;
 {
-  register int token;
   struct sym *current;
   struct sym *base_class;
 
@@ -2957,7 +2960,7 @@
 
       while (!done)
         {
-          switch (token = LA1)
+          switch (LA1)
             {
             case VIRTUAL: case PUBLIC: case PROTECTED: case PRIVATE: 
               MATCH ();
@@ -3025,8 +3028,7 @@
 /* Parse a declaration.  */
 
 void
-declaration (is_extern, flags)
-     int is_extern;
+declaration (flags)
      int flags;
 {
   char *id = NULL;
@@ -3301,7 +3303,7 @@
           return 0;
           
         default:
-          declaration (0, flags);
+          declaration (flags);
           flags = start_flags;
           break;
         }