On Fri, 26 Jun 2009 19:59:33 +0200
[email protected] wrote:

> Date: 2009-06-26 19:59:33 +0200 (Fri, 26 Jun 2009)
> New Revision: 21523
> 
> Log Message:
> FS#10283 simplify plugins' menus by using stringlist with callback
> (by Teruaki Kawashima - some minor changes by myself)
> 
> Modified:
>    trunk/apps/menu.c
>    trunk/apps/plugins/calendar.c
>    trunk/apps/plugins/chopper.c
>    trunk/apps/plugins/keybox.c
>    trunk/apps/plugins/mazezam.c
>    trunk/apps/plugins/solitaire.c
>    trunk/apps/plugins/xobox.c
> 
> Modified: trunk/apps/menu.c


>  static int edit_menu_cb(int action, const struct menu_item_ex
> *this_item) {
> -    (void) this_item;
> -    if (action == ACTION_REQUEST_MENUITEM && memos_in_shown_memory
> <= 0)
> +    int i = (intptr_t)this_item;

Looks incorrect to use intptr_t here, it's made for having an integer
representation of a pointer.

this_item is a pointer

> +    if (action == ACTION_REQUEST_MENUITEM
> +        && memos_in_shown_memory <= 0 && (i==0 || i==1))

But here you compare it to 1 which seems bad, what are you checking
exactly?

There were also other cases of using intptr_t in the commit, could you
check them please?

-- 
Rafaël Carré

Attachment: signature.asc
Description: PGP signature

Reply via email to