Author: hbelusca
Date: Sat Jan 24 00:15:08 2015
New Revision: 66083
URL:
http://svn.reactos.org/svn/reactos?rev=66083&view=rev
Log:
[CDMAKE]
- Disable unused dir_hash_next_dir function and corresponding target_dir_traversal
structure definition.
- Be really sure de->head and de->child are initialized at NULL.
- Remove extra parentheses and unused variable.
Modified:
trunk/reactos/tools/cdmake/dirhash.c
trunk/reactos/tools/cdmake/dirhash.h
Modified: trunk/reactos/tools/cdmake/dirhash.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/cdmake/dirhash.c?rev…
==============================================================================
--- trunk/reactos/tools/cdmake/dirhash.c [iso-8859-1] (original)
+++ trunk/reactos/tools/cdmake/dirhash.c [iso-8859-1] Sat Jan 24 00:15:08 2015
@@ -138,12 +138,14 @@
hashcode = djb_hash(targetnorm);
de = calloc(1, sizeof(*de));
de->parent = parent_de;
+ de->head = NULL;
+ de->child = NULL;
de->normalized_name = strdup(targetnorm);
de->case_name = strdup(chop_filename(casename));
de->next = parent_de->child;
parent_de->child = de;
ent = &dh->buckets[hashcode % NUM_DIR_HASH_BUCKETS];
- while ((*ent))
+ while (*ent)
{
ent = &(*ent)->next;
}
@@ -170,6 +172,7 @@
tf->target_name = strdup(chop_filename(target));
}
+#if 0
static struct target_dir_entry *
dir_hash_next_dir(struct target_dir_hash *dh, struct target_dir_traversal *t)
{
@@ -200,13 +203,13 @@
return t->it;
}
}
+#endif
static void
dir_hash_destroy_dir(struct target_dir_hash *dh, struct target_dir_entry *de)
{
struct target_file *tf;
struct target_dir_entry *te;
- unsigned int hashcode;
while ((te = de->child))
{
de->child = te->next;
Modified: trunk/reactos/tools/cdmake/dirhash.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/cdmake/dirhash.h?rev…
==============================================================================
--- trunk/reactos/tools/cdmake/dirhash.h [iso-8859-1] (original)
+++ trunk/reactos/tools/cdmake/dirhash.h [iso-8859-1] Sat Jan 24 00:15:08 2015
@@ -26,11 +26,13 @@
struct target_dir_entry root;
};
+#if 0
struct target_dir_traversal
{
struct target_dir_entry *it;
int i;
};
+#endif
void normalize_dirname(char *filename);
void dir_hash_add_file(struct target_dir_hash *dh, const char *source, const char
*target);