Namazu-devel-ja(旧)


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Cosmetic fixes in output.c (namazu-bugs-ja#19)



Full_Name: Jun Kuriyama
Version: 2.0.4
OS: FreeBSD
Submission from: (NULL) (210.226.20.160)


This is cosmetic fixes in src/output.c.  It may be not needed...

Index: output.c
===================================================================
RCS file: /storage/cvsroot/namazu/src/output.c,v
retrieving revision 1.71
diff -u -r1.71 output.c
--- output.c	2000/04/04 07:38:59	1.71
+++ output.c	2000/05/11 03:15:54
@@ -475,7 +475,7 @@
 }
 
 /*
- * Displayi page index.
+ * Display page index.
  */
 static void 
 print_page_index(int n)
@@ -614,11 +614,14 @@
 	strcat(tmpfname, suffix);
 
 	buf = nmz_readfile(tmpfname); /* buf is allocated in nmz_readfile. */
+	if (buf == NULL) {
+	    die(nmz_get_dyingmsg());
+	}
 	/* In case of suffix isn't equal to lang, we need code conversion */
 	if (strcmp(suffix, nmz_get_lang()) != 0) {
             /* new is allocated in nmz_codeconv_external. */
 	    char *new = nmz_codeconv_external(buf); 
-	    free(buf);  /* Then we shoul free buf's memory */
+	    free(buf);  /* Then we should free buf's memory */
 	    buf = new;
 	}