summaryrefslogtreecommitdiff
path: root/lib/ipmi_firewall.c
Commit message (Collapse)AuthorAgeFilesLines
* Finalize refactoring of string comparisonsAlexander Amelkin2020-06-101-14/+14
| | | | | | | | | | | | | | Unify the comparison idioms use. Always use `if(!strcmp())` for "if string equals" and `if(strcmp())` for "if string is not equal". Never use `== 0` and `!= 0` with `strcmp()`. Minor reformatting of the code immediately surrounding the refactored lines. Resolves ipmitool/ipmitool#104 Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
* Refactor string comparisonsJiang Junyu2020-06-101-14/+14
| | | | | | | Clean up use of strcmp/strncmp/strncasecmp for command line arguments. Never use anything but `strcmp()` unless absolutely neccessary. Partialy resolves ipmitool/ipmitool#104
* Refactoring: optimize pointer checksAlexander Amelkin2018-08-211-13/+13
| | | | | | | | Remove all direct comparisons to 'NULL' for pointers. Replace them with boolean-like 'if (ptr)' and 'if (!ptr)'. This makes conditions shorter and easier to read. Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
* Refactoring: get rid of superfluous comparisonsAlexander Amelkin2018-08-211-13/+13
| | | | | | | | | | | | | Make code better readable by replacing `if (rsp->ccode > 0)` and 'if (rsp->ccode != 0)' with just `if (rsp->ccode)` as rsp->ccode is anyway an unsigned byte and can't be negative. Also replace 'if (rsp->ccode == 0)' with 'if (!rsp->ccode)'. All these changes make lines shorter and easier to read as a non-zero ccode is an indication of some failure, and so !ccode naturally reads as 'no error'. Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
* general: Fix several misspellingsThorsten Horstmann2018-08-061-7/+7
| | | | | | Fix misspellings found by codespell in code comments, console output and documentation. Resolves ipmitool/ipmitool#28
* ID:446 - Fix broken firewall reset iteratorBoris Ranto2016-06-061-2/+2
| | | | | | | | | | | | | The netfn structures are populated sequentially in the _gather_info function and they are accessed only by even indices (and to the double of its real length). This results in a segmentation fault if you run * ipmitool firewall reset This patch fixes the behaviour so that the ipmi_firewall_reset function treats the structure the same way as the rest of the code does. Signed-off-by: Boris Ranto <branto@redhat.com>
* ID:355 - Fix missing struct initializers in lib/ipmi_firewall.cZdenek Styblik2016-05-301-3/+3
|
* ID:355 - Fix comparison of unsigned expressionZdenek Styblik2015-01-221-2/+4
| | | | | Commit fixes comparison of unsigned expression in ipmi_firewall_reset() and ipmi_firewall_enable_disable().
* ID:355 - Remove defined but unused variable in _set_command_enables()Zdenek Styblik2015-01-221-4/+1
|
* Fix dead code in ipmi_firewall_reset() - CID#1261342Zdenek Styblik2014-12-301-1/+5
|
* Move all files one level up in the file hierarcy, to avoid the useless ↵Petter Reinholdtsen2014-02-051-0/+1191
ipmitool directory.