Re: [PATCH v2 12/12] refs: move the remaining ref module declarations to refs.h

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

 



Michael Haggerty <mhagger@xxxxxxxxxxxx> writes:

> Some functions from the refs module were still declared in cache.h.
> Move them to refs.h.

Yay.  But...

> Add some parameter names where they were missing.

... I do not think some of this is a good change.

> @@ -78,15 +170,15 @@ typedef int each_ref_fn(const char *refname,
>   * modifies the reference also returns a nonzero value to immediately
>   * stop the iteration.
>   */
> -extern int head_ref(each_ref_fn, void *);
> +extern int head_ref(each_ref_fn fn, void *cb_data);

For example, between these two, what did we gain?

Because of their types, it already was clear what the two parameters
are in the original, without noisewords like "fn" (which obviously
stands for a "function", but that is clear due to "each_ref_fn").

> -extern int for_each_glob_ref_in(each_ref_fn, const char *pattern, const char* prefix, void *);
> +extern int for_each_glob_ref_in(each_ref_fn fn, const char *pattern, const char* prefix, void *cb_data);

Likewise for addition of fn and cb_data.

If you really want to make unrelated changes to this file, what you
should fix is to update "const char* prefix" to "const char *prefix"
;-)
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]