aboutsummaryrefslogtreecommitdiffstats
path: root/core/equipment.c
AgeCommit message (Collapse)Author
2018-06-20equipment: use MAX_TANK_INFO in equipment.cGravatar Lubomir I. Ivanov
MAX_TANK_INFO is defined in dive.h but is not used in add_cylinder_description() or when allocating 'tank_info'. Use MAX_TANK_INFO instead of the literal 100. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2018-06-20equipment: sanitize 'ws_info' loop limitsGravatar Lubomir I. Ivanov
Instead of a constant or a macro for the maximum number of 'ws_info' elements the 100 literal was used. Define MAX_WS_INFO in dive.h and use it everywhere. Also clamp loops that iterate `ws_info' to MAX_WS_INFO. Prevents potential out-of-bounds reading, similarly to the previous commit about 'tank_info'. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2018-01-10Unused code: remove weightsystems_equal()Gravatar Jan Mulder
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-11-27Code cleanup: Move index declarations into for loopGravatar Stefan Fuchs
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-11-27Add debug function dump_cylindersGravatar Stefan Fuchs
This function can be used to dump print all cylinder data. Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-04-29Add SPDX header to remaining core filesGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-03-20Add 10l 200bar and 232bar cylinderGravatar Stefan Fuchs
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-03-12Only enable -Wmissing-field-initializers for ClangGravatar Lubomir I. Ivanov
The following pragma is Clang specific: It produces a warning: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas] Only enable it for Clang by checking the __clang__ macro. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-03-07In weights table 'weight' is redundant and no used for other types.Gravatar Martin Měřinský
2016-08-10Add HP117 to the cylinder listGravatar Brian Weber
Reported-by: Brian Weber Signed-off-by: weber311@gmail.com Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-04Make cylinder_nodata() take a const cylinder pointerGravatar Linus Torvalds
Some of the gas mix cleanups I'm doing are in code that uses const pointers, and wants to use this. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-04Move subsurface-core to core and qt-mobile to mobile-widgetsGravatar Dirk Hohndel
Having subsurface-core as a directory name really messes with autocomplete and is obviously redundant. Simmilarly, qt-mobile caused an autocomplete conflict and also was inconsistent with the desktop-widget name for the directory containing the "other" UI. And while cleaning up the resulting change in the path name for include files, I decided to clean up those even more to make them consistent overall. This could have been handled in more commits, but since this requires a make clean before the build, it seemed more sensible to do it all in one. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>