Project

General

Profile

Bug #5005

libnvpair JSON output broken by lint fixes

Added by Joshua M. Clulow over 5 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Normal
Category:
lib - userland libraries
Start date:
2014-07-14
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:

Description

As part of the upstreaming of OS-1840 (i.e. #4304), some fixes were made to placate lint. Most of these were fine, but one of them removed a constant condition in a do {} while(0) loop being used as part of the FPRINTF macro – the removal of this surround in the macro made it unsafe for use in nested if else statements and thus the logic is entirely broken.

We should fix the damage and also introduce some tests into the test suite to ensure this does not happen again.

(Originally Joyent-internal bug OS-3068 )

History

#1

Updated by Joshua M. Clulow over 5 years ago

  • Category set to lib - userland libraries
#2

Updated by Electric Monk about 5 years ago

  • Status changed from New to Closed
  • % Done changed from 90 to 100

git commit 37c79205ad46187f54b2edbf6a468160935f14d9

commit  37c79205ad46187f54b2edbf6a468160935f14d9
Author: Joshua M. Clulow <josh@sysmgr.org>
Date:   2014-11-11T05:18:34.000Z

    5005 libnvpair JSON output broken by lint fixes
    5006 libnvpair JSON cannot print int16 arrays
    Reviewed by: Robert Mustacchi <rm@joyent.com>
    Approved by: Gordon Ross <gwr@nexenta.com>

Also available in: Atom PDF