aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src
diff options
context:
space:
mode:
authorGerd Moellmann <[email protected]>2000-04-19 14:30:52 +0000
committerGerd Moellmann <[email protected]>2000-04-19 14:30:52 +0000
commit8bef35f23aa734ac385b5fd825623b9e7fc81afd (patch)
treec153cdc9f9db93ce9eaa532fc4d3f74fa8394709 /lib-src
parentc750667ef3546dcb738a9be79c4a16ea56f46423 (diff)
(xmalloc, xrealloc): Rewritten.
(declaration): Remove parameter IS_EXTERN. (class_definition): Remove unused variable.
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/ebrowse.c30
1 files changed, 16 insertions, 14 deletions
diff --git a/lib-src/ebrowse.c b/lib-src/ebrowse.c
index 5e70bcd163..de8f7b9f92 100644
--- a/lib-src/ebrowse.c
+++ b/lib-src/ebrowse.c
@@ -498,7 +498,7 @@ void skip_matching P_ ((void));
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 @@ xmalloc (nbytes)
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 @@ xrealloc (p, sz)
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 @@ class_definition (containing, tag, flags, nested)
int flags;
int nested;
{
- register int token;
struct sym *current;
struct sym *base_class;
@@ -2957,7 +2960,7 @@ class_definition (containing, tag, flags, nested)
while (!done)
{
- switch (token = LA1)
+ switch (LA1)
{
case VIRTUAL: case PUBLIC: case PROTECTED: case PRIVATE:
MATCH ();
@@ -3025,8 +3028,7 @@ class_definition (containing, tag, flags, nested)
/* Parse a declaration. */
void
-declaration (is_extern, flags)
- int is_extern;
+declaration (flags)
int flags;
{
char *id = NULL;
@@ -3301,7 +3303,7 @@ globals (start_flags)
return 0;
default:
- declaration (0, flags);
+ declaration (flags);
flags = start_flags;
break;
}