On Sun, Dec 01, 2013 at 02:50:15PM -0800, Shawn Landden wrote:
> ---
>  src/shared/strv.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/shared/strv.c b/src/shared/strv.c
> index 607c221..cc6adfa 100644
> --- a/src/shared/strv.c
> +++ b/src/shared/strv.c
> @@ -84,7 +84,7 @@ char **strv_copy(char * const *l) {
>          return r;
>  }
>  
> -unsigned strv_length(char * const *l) {
> +_pure_ unsigned strv_length(char * const *l) {
>          unsigned n = 0;
>  
_pure_ only makes sense in .h files, except for static functions of course, 
which
are not declared in an .h file. This annotation tells the compiler how to 
optimize
calls to the function, so it must be available where it is used.

Zbyszek
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to