On So 6.Dez'09 at 2:23:51 +0100, Nicolas Bonifas wrote:
> Remove useless test (if menu is NULL we would have a null pointer
> dereference when initializing scr).
I agree that the test is not avoiding one possible problem (the
initialization of 'src' a few lines before the test), but shouldn't
we just fix _that_ instead of removing the test altogether?
Ie, why not move the assignment of 'src' to after the test?
> --- a/src/winmenu.c
> +++ b/src/winmenu.c
> @@ -215,9 +215,6 @@ static void updateWorkspaceMenu(WMenu * menu)
> char title[MAX_WORKSPACENAME_WIDTH + 1];
> int i;
>
> - if (!menu)
> - return;
> -
> for (i = 0; i < scr->workspace_count; i++) {
> if (i < menu->entry_no) {
> if (strcmp(menu->entries[i]->text,
> scr->workspaces[i]->name) != 0) {
> --
> 1.6.5
>
--
To unsubscribe, send mail to [email protected].