Mercurial > hg > xemacs-beta
diff lwlib/lwlib-Xlw.c @ 3462:6c7605dfcf07
[xemacs-hg @ 2006-06-19 18:19:33 by james]
Fix various problems found by static checkers: use of uninitialized values,
dereferencing pointers before checking whether they are NULL, memory leaks,
and incomplete checking of return values. <m3k67gpyhk.fsf@jerrypc.cs.usu.edu>
author | james |
---|---|
date | Mon, 19 Jun 2006 18:19:38 +0000 |
parents | ad2f4ae9895b |
children | 383ab474a241 |
line wrap: on
line diff
--- a/lwlib/lwlib-Xlw.c Mon Jun 19 18:10:19 2006 +0000 +++ b/lwlib/lwlib-Xlw.c Mon Jun 19 18:19:38 2006 +0000 @@ -158,13 +158,13 @@ XlwScrollBarCallbackStruct *data = (XlwScrollBarCallbackStruct *) call_data; scroll_event event_data; - scrollbar_values *val = - (scrollbar_values *) instance->info->val->scrollbar_data; + scrollbar_values *val; double percent; if (!instance || widget->core.being_destroyed) return; + val = (scrollbar_values *) instance->info->val->scrollbar_data; id = instance->info->id; percent = (double) (data->value - 1) / (double) (INT_MAX - 1);