Project

General

Profile

Bug #5707

LOADPRIVDATA doesn't behave like a function

Added by Josef Sipek over 5 years ago. Updated over 5 years ago.

Status:
New
Priority:
Low
Assignee:
-
Category:
lib - userland libraries
Start date:
2015-03-12
Due date:
% Done:

0%

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

Description

The LOADPRIVDATA "returns" a value by just assigning it to the pointer argument. E.g., consider the following non-obvious code:

void *d;
LOADPRIVDATA(d);
/* d is now different from what it was before */

It's simple enough to change it to something like:

d = GETPRIVDATA();

This is easier to reason about since it has no obvious side-effects.

History

#1

Updated by Josef Sipek over 5 years ago

  • Category set to lib - userland libraries

Also available in: Atom PDF