Repositories » TXT0
Clone URL:  
Pushed to one repository · View In Graph Contained in tip

Fixed bug in doccmp(). It has to check for equal id strings, using
strcmp(), otherwise, a hash table of Docs will never get populated

correctly.

Changeset c75f9d817b1f

Parent 755567d6bb5f

by Rup Palchowdhury

Changes to one file · Browse files at c75f9d817b1f Showing diff from parent 755567d6bb5f Diff from another changeset...

Change 1 of 2 Show Entire File doc.c Stacked
 
1
 
2
3
4
 
15
16
17
18
 
19
20
21
 
1
2
3
4
5
 
16
17
18
 
19
20
21
22
@@ -1,4 +1,5 @@
 #include <stdlib.h> +#include <string.h>  #include "Doc.h"    Doc *newdoc(char *id, unsigned n_byte, unsigned n_term) @@ -15,7 +16,7 @@
 {   if (((Doc *)d1)->id == ((Doc *)d2)->id)   return 0; - return 1; + return strcmp(((Doc *)d1)->id, ((Doc *)d2)->id);  }    unsigned hashdoc(void *data, unsigned hsize)