changeset 17168:53314a257690

* etags.c (add_regex): reset *putbuf before using it.
author Francesco Potortì <pot@gnu.org>
date Mon, 17 Mar 1997 10:25:53 +0000
parents 81e18e642412
children 018de297d2d5
files lib-src/etags.c
diffstat 1 files changed, 4 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/lib-src/etags.c	Mon Mar 17 09:54:01 1997 +0000
+++ b/lib-src/etags.c	Mon Mar 17 10:25:53 1997 +0000
@@ -31,7 +31,7 @@
  *	Francesco Potorti` (F.Potorti@cnuce.cnr.it) is the current maintainer.
  */
 
-char pot_etags_version[] = "@(#) pot revision number is 11.80";
+char pot_etags_version[] = "@(#) pot revision number is 11.82";
 
 #define	TRUE	1
 #define	FALSE	0
@@ -86,7 +86,7 @@
 #endif /* ETAGS_REGEXPS */
 
 /* Define CTAGS to make the program "ctags" compatible with the usual one.
- Let it undefined to make the program "etags", which makes emacs-style
+ Leave it undefined to make the program "etags", which makes emacs-style
  tag tables and tags typedefs, #defines and struct/union/enum by default. */
 #ifdef CTAGS
 # undef  CTAGS
@@ -3973,7 +3973,7 @@
 {
   char *name;
   const char *err;
-  struct re_pattern_buffer *patbuf;
+  struct re_pattern_buffer *patbuf, patbuf_init = { 0 };
 
   if (regexp_pattern == NULL)
     {
@@ -4002,10 +4002,7 @@
   (void) scan_separators (name);
 
   patbuf = xnew (1, struct re_pattern_buffer);
-  patbuf->translate = NULL;
-  patbuf->fastmap = NULL;
-  patbuf->buffer = NULL;
-  patbuf->allocated = 0;
+  *patbuf = patbuf_init;
 
   err = re_compile_pattern (regexp_pattern, strlen (regexp_pattern), patbuf);
   if (err != NULL)