From: Gerd Moellmann Date: Wed, 19 Apr 2000 14:30:52 +0000 (+0000) Subject: (xmalloc, xrealloc): Rewritten. X-Git-Tag: emacs-pretest-21.0.90~4202 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8bef35f23aa734ac385b5fd825623b9e7fc81afd;p=emacs.git (xmalloc, xrealloc): Rewritten. (declaration): Remove parameter IS_EXTERN. (class_definition): Remove unused variable. --- diff --git a/lib-src/ebrowse.c b/lib-src/ebrowse.c index 5e70bcd1630..de8f7b9f920 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; }