On Tue, Jun 30, 2015 at 02:22:34PM +0200, Hans de Goede wrote:
> Hi Peter,
>
> On 29-06-15 05:49, Peter Hutterer wrote:
> >Don't require a list_init() on a node before we can call list_remove on it,
> >it
> >clutters up the code for little benefit.
> >
> >Signed-off-by: Peter Hutterer
> >---
> >
On Tue, Jun 30, 2015 at 5:22 AM, Hans de Goede wrote:
>
> + if (elm->next == NULL && elm->prev == NULL)
>> + return;
>> +
>> elm->prev->next = elm->next;
>> elm->next->prev = elm->prev;
>> elm->next = NULL;
>>
>>
> I do not think this is a good idea, mo
Hi Peter,
On 29-06-15 05:49, Peter Hutterer wrote:
Don't require a list_init() on a node before we can call list_remove on it, it
clutters up the code for little benefit.
Signed-off-by: Peter Hutterer
---
src/libinput-util.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/libinpu
On Mon, 29 Jun 2015 13:49:21 +1000
Peter Hutterer wrote:
> Don't require a list_init() on a node before we can call list_remove on it, it
> clutters up the code for little benefit.
>
> Signed-off-by: Peter Hutterer
> ---
> src/libinput-util.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> dif
On 06/29/2015 04:32 PM, Peter Hutterer wrote:
> On Mon, Jun 29, 2015 at 04:00:51PM -0700, Ping Cheng wrote:
>> I guess Bill meant "||" should be used instead of "&&"? One of the == NULL
>> would lead to a crash...
>
> that'd would hide potential memory corruption or other bugs and won't show
> up
On Mon, Jun 29, 2015 at 04:00:51PM -0700, Ping Cheng wrote:
> On Mon, Jun 29, 2015 at 3:09 PM, Peter Hutterer
> wrote:
>
> > On Mon, Jun 29, 2015 at 12:37:26PM -0700, Bill Spitzak wrote:
> > > On Sun, Jun 28, 2015 at 8:49 PM, Peter Hutterer <
> > peter.hutte...@who-t.net>
> > > wrote:
> > >
> > >
On Mon, Jun 29, 2015 at 3:09 PM, Peter Hutterer
wrote:
> On Mon, Jun 29, 2015 at 12:37:26PM -0700, Bill Spitzak wrote:
> > On Sun, Jun 28, 2015 at 8:49 PM, Peter Hutterer <
> peter.hutte...@who-t.net>
> > wrote:
> >
> > >
> > > + if (elm->next == NULL && elm->prev == NULL)
> > > +
On Mon, Jun 29, 2015 at 12:37:26PM -0700, Bill Spitzak wrote:
> On Sun, Jun 28, 2015 at 8:49 PM, Peter Hutterer
> wrote:
>
> >
> > + if (elm->next == NULL && elm->prev == NULL)
> > + return;
> > +
> > elm->prev->next = elm->next;
> > elm->next->prev = elm->prev
On Sun, Jun 28, 2015 at 8:49 PM, Peter Hutterer
wrote:
>
> + if (elm->next == NULL && elm->prev == NULL)
> + return;
> +
> elm->prev->next = elm->next;
> elm->next->prev = elm->prev;
> elm->next = NULL;
>
You probably don't need to check both pointers
Don't require a list_init() on a node before we can call list_remove on it, it
clutters up the code for little benefit.
Signed-off-by: Peter Hutterer
---
src/libinput-util.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/libinput-util.c b/src/libinput-util.c
index 3a9c8db..f19695c 10
10 matches
Mail list logo