Project

General

Profile

Actions

Bug #8135

closed

libfru: char Str::tokenize should return NUL char, not NULL pointer

Added by Toomas Soome about 6 years ago. Updated about 6 years ago.

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

100%

Estimated time:
Difficulty:
Bite-size
Tags:
needs-triage
Gerrit CR:
External Bug:

Description

This is small fallout from 8017 Comply with POSIX.1-2008 and C++11 for the definition of NULL, building with gcc 6 reveals:

../libgenutil/Str.cc: In member function 'char Str::tokenize(Str&, const Str&, Str&)':
../libgenutil/Str.cc:174:14: error: cannot convert 'std::nullptr_t' to 'char' in return
return (NULL);

Which of course is bug in the code, we should return '\0' here.

Actions #1

Updated by Electric Monk about 6 years ago

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

git commit 132157d7fb25c120ae1deca2a65fa7c78e8fcfd0

commit  132157d7fb25c120ae1deca2a65fa7c78e8fcfd0
Author: Toomas Soome <tsoome@me.com>
Date:   2017-05-08T15:42:27.000Z

    8135 libfru: char Str::tokenize should return NUL char, not NULL pointer
    Reviewed by: Yuri Pankov <yuri.pankov@gmail.com>
    Reviewed by: Igor Kozhukhov <igor@dilos.org>
    Reviewed by: Alexander Pyhalov <apyhalov@gmail.com>
    Reviewed by: Aurélien Larcher <aurelien.larcher@gmail.com>
    Approved by: Robert Mustacchi <rm@joyent.com>

Actions

Also available in: Atom PDF