[PATCH 30/30] __attribute__((nonnull(1)))

[email protected] <[email protected]>
Newsgroups dev.linux.lists.lvm-devel
Message-ID <87tyka4kk8.wl%[email protected]>
At Mon, 25 Oct 2010 10:24:37 +0200,
Zdenek Kabelac wrote:
> 
> 
> Signed-off-by: Zdenek Kabelac <[email protected]>
> ---
>  lib/device/dev-cache.h |    2 +-
>  libdm/regex/ttree.c    |    3 ++-
>  2 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/device/dev-cache.h b/lib/device/dev-cache.h
> index c1c86d6..772d28e 100644
> --- a/lib/device/dev-cache.h
> +++ b/lib/device/dev-cache.h
> @@ -41,7 +41,7 @@ int dev_cache_has_scanned(void);
>  
>  int dev_cache_add_dir(const char *path);
>  int dev_cache_add_loopfile(const char *path);
> -struct device *dev_cache_get(const char *name, struct dev_filter *f);
> +struct device *dev_cache_get(const char *name, struct dev_filter *f) __attribute__((nonnull(1)));
>  
>  void dev_set_preferred_name(struct str_list *sl, struct device *dev);
>  
> diff --git a/libdm/regex/ttree.c b/libdm/regex/ttree.c
> index 0ad40bd..fc24c96 100644
> --- a/libdm/regex/ttree.c
> +++ b/libdm/regex/ttree.c
> @@ -28,7 +28,8 @@ struct ttree {
>  	struct node *root;
>  };
>  
> -static struct node **_lookup_single(struct node **c, unsigned int k)
> +static __attribute__((nonnull (1)))
> +struct node **_lookup_single(struct node **c, unsigned int k)

Ack.  Verbose, isn't it.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.