1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-04-25 10:01:26 +02:00
Commit Graph

22 Commits

Author SHA1 Message Date
Christophe CURIS 662b83769a WUtil: changed order for null pointer check in array functions (Coverity #72806, #72807, #72819)
As pointed by Coverity, there were some null pointer checks that had been
misplaced, due to a pointer dereference present in a preceding check. This
had been fixed by adding another null check in the check, making a
duplicate check.

This patch moves the null pointer check in first place, and remove the
pointer check from the range check to separate the pointer check on one
side and the range check on the other side.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2014-11-23 22:42:18 +00:00
David Maciejak 39e1398257 WINGs: correct possible null pointer dereference
As reported by cppcheck:

[WINGs/array.c:129] -> [WINGs/array.c:131]: (warning) Possible null pointer dereference: array - otherwise it is redundant to check it against null.
[WINGs/array.c:151] -> [WINGs/array.c:153]: (warning) Possible null pointer dereference: array - otherwise it is redundant to check it against null.
[WINGs/array.c:170] -> [WINGs/array.c:172]: (warning) Possible null pointer dereference: array - otherwise it is redundant to check it against null.

This patch is checking that the var name 'array' exists.
2014-07-27 09:45:38 -06:00
Gabriel VLASIU 75654cf43c Proper fix for array == NULL in WMPopFromArray() function. 2013-07-06 11:36:50 +01:00
Gabriel VLASIU 527f5f1730 Fix segfault when SwitchPanelImages = None and user press Alt+tab. 2013-06-19 14:45:18 +01:00
Alexey I. Froloff 2be53e92e6 WMPopFromArray(): avoid underflow
Signed-off-by: Alexey I. Froloff <raorn@raorn.name>
2012-06-20 14:02:39 +01:00
Carlos R. Mafra 688a56e8ab Change to the linux kernel coding style
for arq in `git ls-files *.c`; do
    echo $arq;
    indent -linux -l115 $arq;
    done

The different line break at 115 columns is because
I use a widescreen monitor :-)
2009-08-20 00:59:40 +02:00
dan 90c0e656f1 replaced windowmaker.org with windowmaker.info everywhere 2006-04-25 19:35:14 +00:00
dan f058fdf72c - Fixed small memory leak in the WINGs' font panel code.
- Fixed call to qsort in WMSortArray.
- Fixed a memleak in the WINGs' file panel.
2003-04-02 11:37:04 +00:00
dan 046403dbbb - added WMRemoveFromArrayMatching(array, match, cdata), which will remove the
first element in the array that is matched by match(item, cdata)==True.
- added WMArrayFirst(), WMArrayLast(), WMArrayNext() and WMArrayPrevious()
  functions and also WM_ITERATE_ARRAY() and WM_ETARETI_ARRAY() macros, to make
  interfaces to WMBag and WMArray similar and to make life a little simpler
  when iterating through all elements of an array.
- replaced bags with arrays wherever appropriate. This will improve
  performance a bit.
- replaced some recursive code with iterative code in WINGs/selection.c
- some code cleanup is src/
2001-04-15 01:22:56 +00:00
dan 497e34b6b8 - Replaced all free() with wfree() where appropriate
- Fixed some memory leaks
2000-10-31 14:57:22 +00:00
dan b2478b634f - the list multiple selection code is working now. it still needs some
minor work and cleanup.
- made some bag and array functions to return void instead of int.
- a few new array functions.
- better handling of mouse wheel.

!!! make clean after this update before you rebuild. some enums changed.
2000-10-01 23:26:03 +00:00
dan 6973f07f30 Remake of the WMList code to allow multiple selection. Not complete yet.
It will not even compile. I Will finish it later today.
2000-09-28 03:09:57 +00:00
dan ce8b816c5d Sorting functions return void now instead of int. 2000-09-26 10:54:37 +00:00
dan 23ac6cc088 Added some typedef'ed functions for readability. 2000-09-25 01:42:06 +00:00
dan ccbb6e8e15 Fixed some bugs, and compilation warnings. 2000-09-24 02:31:58 +00:00
dan 41ff127444 - Fixed WMArray.
- Changed WMList to use WMArray instead of WMBag
- Fixed compilation problems in WPrefs.app
2000-09-23 03:49:58 +00:00
dan 40e67dfce0 Removed some redundant code. 2000-09-21 01:25:47 +00:00
dan c1a77f233f Finished the WMArray class 2000-09-20 00:30:45 +00:00
dan 468f578345 WMArray class is almost ready. 2000-09-19 02:05:45 +00:00
dan 85702115f3 Some more functions for the array class 2000-09-17 21:52:24 +00:00
dan 9f98db6791 Some more code to the WMArray class 2000-09-15 09:42:22 +00:00
dan 595d2b060b Removed array bag, and restructured the tree bag to be WMBag 2000-09-15 04:57:31 +00:00