Project

General

Profile

Actions

Bug #5588

closed

invalid use of NULL in itm_util.c

Added by Richard PALO over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Start date:
2015-02-04
Due date:
% Done:

100%

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

Description

In c, uintptr_t is defined as

an unsigned integer type with the property that any valid pointer to void can be
converted to this type, then converted back to pointer to void, and the result will 
compare equal to the original pointer

so in this construct:

               tbl->name.itm_ptr = NULL;

Assigning NULL directly is inproper, it should be casted.

Also, NULL is meaningless for an enum's value, so the attached patch
fixes these.


Files

Actions

Also available in: Atom PDF