Project

General

Profile

Bug #8136

libnisdb: NULL pointer is used in wrong context

Added by Toomas Soome over 2 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
lib - userland libraries
Start date:
2017-05-01
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:

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);

History

#1

Updated by Electric Monk over 2 years ago

  • % Done changed from 90 to 100
  • Status changed from In Progress to Closed

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>

Also available in: Atom PDF