[ros-dev] [ros-diffs] [hbelusca] 66083: [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. ...
Pierre Schweitzer
pierre at reactos.org
Sat Jan 24 08:19:19 UTC 2015
On 24/01/2015 01:15, hbelusca at svn.reactos.org wrote:
> ==============================================================================
> --- 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 has been allocated few lines upper with calloc.
head & child CANNOT be different from NULL.
This is non sense.
> @@ -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
Once again, this is trunk, not your working copy.
If you 0 out, please add a comment explaining it's just unused and not
buggy.
And actually, because it's trunk & unusued, it would be better just to
remove them. svn history can help finding them back if really needed.
> ==============================================================================
> --- 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
See comment above.
Cheers,
--
Pierre Schweitzer <pierre at reactos.org>
System & Network Administrator
Senior Kernel Developer
ReactOS Deutschland e.V.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3940 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://www.reactos.org/pipermail/ros-dev/attachments/20150124/277ed0c5/attachment.bin>
More information about the Ros-dev
mailing list