Markus Elfring
0f6cb93a09
Bug #165 : Deletion of unnecessary null pointer checks
The function "free" performs input parameter validation.
http://pubs.opengroup.org/onlinepubs/9699919799/functions/free.html
It is therefore not needed to check a passed pointer before this function call.
A corresponding update suggestion was generated by the software "Coccinelle"
from the following semantic patch approach.
http://coccinelle.lip6.fr/
@Remove_unnecessary_pointer_checks1@
expression x;
@@
-if (x != \(0 \| NULL\))
free(x);
@Remove_unnecessary_pointer_checks2@
expression x;
@@
-if (x != \(0 \| NULL\)) {
free(x);
x = \(0 \| NULL\);
-}
@Remove_unnecessary_pointer_checks3@
expression a, b;
@@
-if (a != \(0 \| NULL\) && b != \(0 \| NULL\))
+if (a)
free(b);
@Remove_unnecessary_pointer_checks4@
expression a, b;
@@
-if (a != \(0 \| NULL\) && b != \(0 \| NULL\)) {
+if (a) {
free(b);
b = \(0 \| NULL\);
}
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
il y a 10 ans
lucas8
3b8a79fb8b
Made argument of s_strdup const
il y a 10 ans
Bert Münnich
5cfae63620
Create thumbnail cache dir automatically
il y a 10 ans
Bert Münnich
408b75a0b4
Ignore dotfiles for -r
il y a 12 ans
Bert Münnich
08ae25da22
Refactored function definitions to use dangling brace
il y a 12 ans
Bert Münnich
6d3bbc6d5e
Updated/corrected license header
il y a 12 ans
Bert Münnich
d407dd65d5
Already in the year 2012
il y a 13 ans
Bert Münnich
c3c95ab218
Removed slideshow support
il y a 13 ans
Bert Münnich
36177fb180
Updated contact information
il y a 13 ans
Bert Münnich
4383a651c7
Strictly adhere to ANSI-C standard
il y a 13 ans
Bert Münnich
a09b20c5e6
Use void for empty argument lists
il y a 13 ans
Bert Münnich
8dcf682de9
Made all conditionals more precise
il y a 13 ans
Bert Münnich
22d4e991d5
Transformed function macros in util.h to inline functions
il y a 13 ans
Bert Münnich
d721d8453e
Added STREQ macro
il y a 13 ans
rck
3a81af41ac
make use of EXIT_ macros
il y a 13 ans
Bert
510512714d
Added slideshow support
il y a 13 ans
Bert
6e575b0f72
Strict conformance to IEEE Std 1003.1-2001
il y a 13 ans
Bert
711494ad36
Avoid conflicting macros
il y a 13 ans
Bert
d585b86354
Reformated license header
il y a 13 ans
Bert
1e84773276
Data driven timeout handling
il y a 13 ans
Bert
8b3ae5027e
Added support for gif animation
il y a 13 ans
Bert
8763f6930f
Corrected FSF address in license headers
il y a 13 ans
Bert
ff013dd009
Revised handling of file names & paths
il y a 13 ans
Bert
b8ff1677b1
Major code refactoring
- Configurable key and mouse mappings in config.h
- Put event handling code from main.c into events.[ch]
il y a 13 ans
Bert
ea23115af4
Use getline instead of readline
il y a 13 ans
Bert
a90bd1c833
Refactored recursive directory util functions
il y a 14 ans
Bert
e9996882cb
Moved read_dir_rec into util.c
il y a 14 ans
Bert
92709b2b2f
Use directory structure in cache dir
il y a 14 ans
Bert
f93f4d887c
Write cache file for thumbnail directly after creating it
il y a 14 ans
Bert
c21a3e3f28
Write thumbnail cache files on exit
il y a 14 ans
Bert
e8ed491ba9
Fixed empty lines in readline()
il y a 14 ans
Bert
cfed65d36f
More appropriate buffer sizes
il y a 14 ans
Bert
26cc5aff69
Read filenames from stdin
il y a 14 ans
Bert
bad9a70a48
Display filesize in window title
il y a 14 ans
Bert
e8cf8da208
Fixed die/warn in util.c
il y a 14 ans
Bert
8f4af658ae
Refactored, new files util.[ch], C89
il y a 14 ans
Bert
229830ad18
Replace -w with well-known geometry option
il y a 14 ans
Bert
c52c4fa69e
Mouse-panning while pressing button2
il y a 14 ans
Bert
8123d63c5b
Added plenty lots of options
il y a 14 ans
Bert
f47092cda2
Complete mouse support
il y a 14 ans
Bert
2b1c0885fe
Implemented fullscreen mode
il y a 14 ans
Bert
c7860b690b
Stricter object encapsulation
il y a 14 ans
Bert
029e1208b9
No more expose handling
il y a 14 ans
Bert
08018427c6
Put some useful information in the window title
il y a 14 ans
Bert
79c7e6178e
Render image on window
il y a 14 ans
Bert
fb6411ab5c
Encapsulate window environment in win_env_t
il y a 14 ans
Bert
47d107edb5
React to ConfigureNotify
il y a 14 ans
Bert
49a69a357b
Added win_open & win_close
il y a 14 ans
Bert
e7bc3bb71b
Non-working skeleton
il y a 14 ans