raylib/src
Dani Martin 62cdb2299b
[cppcheck] Improvements in SaveStorageValue() in core.c (#1160)
* [cppcheck] Improvements in SaveStorageValue() in core.c

in file core.c cppcheck shows errors only in function SaveStorageValue():

* Common realloc mistake: 'fileData' nulled but not freed upon failure
* Memory pointed to by 'fileData' is freed twice.

Validation:
* Tested examples/core/core_storage_values.c
* Launched Unit Test for this function
* Rerun CPPCHECK afer fix

* [cppcheck] Change functions header to accept only positive position in files

Changes:
* Functions SaveStorageValue(), LoadStorageValue() (core.c)
* Functions LoadFileData(), SaveFileData() (utils.c)
* Headers in raylib.h

Validation:
* Tested examples/core/core_storage_values.c
* Launched Unit Test for these functions
* Rerun CPPCHECK afer fix
2020-03-30 13:51:36 +02:00
..
external Update miniaudio.h 2020-02-19 12:19:41 +01:00
camera.h Comment tweaks 2020-03-23 20:24:20 +01:00
CMakeLists.txt CMakeLists.txt: report generated CMAKE_CONFIGURATION_TYPES 2020-03-24 06:37:22 +01:00
CMakeOptions.txt Add config SUPPORT_SSH_KEYBOARD_RPI 2019-05-21 20:59:13 +02:00
config.h Enable IQM models support on config.h 2020-03-25 18:51:46 +01:00
config.h.in ADDED small compression API 2019-09-09 21:56:16 +02:00
core.c [cppcheck] Improvements in SaveStorageValue() in core.c (#1160) 2020-03-30 13:51:36 +02:00
easings.h Replace tabs with spaces and update year of copyright notices (#927) 2019-08-03 11:07:41 +02:00
gestures.h Review GetCurrentTime() 2020-02-04 17:06:08 +01:00
Makefile Revert "Update compilation warning flags (#1151)" 2020-03-28 18:39:56 +01:00
models.c [models] Review TRACELOG() messages, categorized 2020-03-27 17:43:51 +01:00
physac.h Review DEBUG trace log and custom allocators 2020-02-10 10:56:39 +01:00
raudio.c Review TRACELOG() messages 2020-03-27 18:49:21 +01:00
raudio.h Add function prototype 2020-02-14 23:10:02 +01:00
raylib.dll.rc Develop branch integration (#1091) 2020-02-03 18:31:30 +01:00
raylib.dll.rc.data Update resource files 2020-02-06 16:37:38 +01:00
raylib.h [cppcheck] Improvements in SaveStorageValue() in core.c (#1160) 2020-03-30 13:51:36 +02:00
raylib.ico Updated icon data 2018-09-26 16:02:42 +02:00
raylib.rc Update window rc 2020-03-28 18:27:56 +01:00
raylib.rc.data Update window rc 2020-03-28 18:27:56 +01:00
raymath.h Fix "variable is reassigned before use" linter warning on raymath.h (#1158) 2020-03-29 22:03:10 +02:00
rglfw.c Update year to 2020 2020-01-05 20:01:54 +01:00
rlgl.h Review TRACELOG() categories 2020-03-27 18:45:37 +01:00
rmem.h Minor format tweaks 2020-02-06 16:44:04 +01:00
rnet.h [rnet] Renamed some functions 2020-02-20 13:46:33 +01:00
shapes.c Replaced fabs() by fabsf() when required 2020-02-28 12:54:39 +01:00
shell.html Avoid icons in shell 2020-03-03 15:53:13 +01:00
text.c Review TRACELOG() messages 2020-03-27 18:49:21 +01:00
textures.c Update ImageDraw*() functions to match arguments of Draw*() (#1156) 2020-03-29 12:43:34 +02:00
utils.c [cppcheck] Improvements in SaveStorageValue() in core.c (#1160) 2020-03-30 13:51:36 +02:00
utils.h Android: Support file saving to internal data storage 2020-03-05 18:12:41 +01:00