On Tue, Oct 27, 2020 at 11:45 AM Christoph Hellwig wrote:
>
> > index f277d023ebcd..b55e6ef4d677 100644
> > --- a/fs/kernfs/file.c
> > +++ b/fs/kernfs/file.c
> > @@ -124,7 +124,7 @@ static void *kernfs_seq_start(struct seq_file *sf,
> > loff_t *ppos)
> >* The same behavior and
> index f277d023ebcd..b55e6ef4d677 100644
> --- a/fs/kernfs/file.c
> +++ b/fs/kernfs/file.c
> @@ -124,7 +124,7 @@ static void *kernfs_seq_start(struct seq_file *sf, loff_t
> *ppos)
>* The same behavior and code as single_open(). Returns
>* !NULL if pos is at the
On Mon, Oct 26, 2020 at 10:52:56PM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann
>
> Clang points out that adding something to NULL is notallowed
> in standard C:
>
> fs/kernfs/file.c:127:15: warning: performing pointer arithmetic on a
> null pointer has undefined behavior
From: Arnd Bergmann
Clang points out that adding something to NULL is notallowed
in standard C:
fs/kernfs/file.c:127:15: warning: performing pointer arithmetic on a
null pointer has undefined behavior [-Wnull-pointer-arithmetic]
return NULL + !*ppos;
4 matches
Mail list logo