Actions
Bug #8136
closedlibnisdb: NULL pointer is used in wrong context
Start date:
2017-05-01
Due date:
% Done:
100%
Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:
Description
This is another cluster of bugs the 8017 Comply with POSIX.1-2008 and C++11 for the definition of NULL did reveal.
NULL pointer is not long int. nor bool_t. Some examples:
db_dictionary.cc:1405:24: error: invalid operands of types 'bool_t {aka int}' and 'std::nullptr_t' to binary 'operator=='
if ((logfile->open()) == NULL) {
db_table.cc:679:15: error: cannot convert 'std::nullptr_t' to 'entryp {aka long int}' in return
return (NULL);
Updated by Electric Monk about 6 years ago
- Status changed from In Progress to Closed
- % Done changed from 90 to 100
git commit bc30fb4ce8dc6097bcc9d02b809aa94feef79bfa
commit bc30fb4ce8dc6097bcc9d02b809aa94feef79bfa Author: Toomas Soome <tsoome@me.com> Date: 2017-05-08T16:27:57.000Z 8136 libnisdb: NULL pointer is used in wrong context Reviewed by: Yuri Pankov <yuri.pankov@gmail.com> Reviewed by: Marcel Telka <marcel@telka.sk> Reviewed by: Igor Kozhukhov <igor@dilos.org> Approved by: Robert Mustacchi <rm@joyent.com>
Actions