On 20/10/15 23:30, Pierre Neidhardt wrote:
> Signed-off-by: Pierre Neidhardt <[email protected]>
> ---
>  src/common/util-common.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/src/common/util-common.h b/src/common/util-common.h
> index a2093be..373db19 100644
> --- a/src/common/util-common.h
> +++ b/src/common/util-common.h
> @@ -34,6 +34,8 @@ char *safe_fgets(char *s, int size, FILE *stream);
>  char *strndup(const char *s, size_t n);
>  #endif
>  
> +#define ARRAYSIZE(a) (sizeof (a) / sizeof (a[0]))
> +
>  #endif /* _PM_UTIL_COMMON_H */
>  

This is needed nowhere in libalpm, so put this in src/pacman/util.c at
the top of the file.  And you might as well use it in the three places
that could use it in pacman while you are at it.

Allan

Reply via email to