Re: [systemd-devel] [PATCH] journal: fix assert against (theoretical) undefined behavior

2013-12-16 Thread Shawn Landden
On Mon, Dec 16, 2013 at 12:19 PM, Thomas H.P. Andersen wrote: > On Mon, Dec 16, 2013 at 8:15 PM, Shawn Landden wrote: >> On Mon, Dec 16, 2013 at 11:06 AM, Thomas H.P. Andersen >> wrote: >>> On Mon, Dec 16, 2013 at 7:50 PM, Shawn Landden >>> wrote: On Mon, Dec 16, 2013 at 10:36 AM, Lennar

Re: [systemd-devel] [PATCH] journal: fix assert against (theoretical) undefined behavior

2013-12-16 Thread Thomas H.P. Andersen
On Mon, Dec 16, 2013 at 8:15 PM, Shawn Landden wrote: > On Mon, Dec 16, 2013 at 11:06 AM, Thomas H.P. Andersen > wrote: >> On Mon, Dec 16, 2013 at 7:50 PM, Shawn Landden wrote: >>> On Mon, Dec 16, 2013 at 10:36 AM, Lennart Poettering >>> wrote: On Mon, 16.12.13 09:20, Shawn Landden (sh...

Re: [systemd-devel] [PATCH] journal: fix assert against (theoretical) undefined behavior

2013-12-16 Thread Shawn Landden
On Mon, Dec 16, 2013 at 11:06 AM, Thomas H.P. Andersen wrote: > On Mon, Dec 16, 2013 at 7:50 PM, Shawn Landden wrote: >> On Mon, Dec 16, 2013 at 10:36 AM, Lennart Poettering >> wrote: >>> On Mon, 16.12.13 09:20, Shawn Landden (sh...@churchofgit.com) wrote: >>> While all the libc implementat

Re: [systemd-devel] [PATCH] journal: fix assert against (theoretical) undefined behavior

2013-12-16 Thread Thomas H.P. Andersen
On Mon, Dec 16, 2013 at 7:50 PM, Shawn Landden wrote: > On Mon, Dec 16, 2013 at 10:36 AM, Lennart Poettering > wrote: >> On Mon, 16.12.13 09:20, Shawn Landden (sh...@churchofgit.com) wrote: >> >>> While all the libc implementations I know return NULL when memchr's size >>> parameter is 0: >>> >>>

Re: [systemd-devel] [PATCH] journal: fix assert against (theoretical) undefined behavior

2013-12-16 Thread Shawn Landden
On Mon, Dec 16, 2013 at 10:36 AM, Lennart Poettering wrote: > On Mon, 16.12.13 09:20, Shawn Landden (sh...@churchofgit.com) wrote: > >> While all the libc implementations I know return NULL when memchr's size >> parameter is 0: >> >> C11 7.24.1p2: Where an argument declared as "size_t n" specifies

Re: [systemd-devel] [PATCH] journal: fix assert against (theoretical) undefined behavior

2013-12-16 Thread Lennart Poettering
On Mon, 16.12.13 09:20, Shawn Landden (sh...@churchofgit.com) wrote: > While all the libc implementations I know return NULL when memchr's size > parameter is 0: > > C11 7.24.1p2: Where an argument declared as "size_t n" specifies the length > of the array for a function, n can have the value zer

[systemd-devel] [PATCH] journal: fix assert against (theoretical) undefined behavior

2013-12-16 Thread Shawn Landden
While all the libc implementations I know return NULL when memchr's size parameter is 0: C11 7.24.1p2: Where an argument declared as "size_t n" specifies the length of the array for a function, n can have the value zero on a call to that function. Unless explicitly stated otherwise in the descript