summaryrefslogtreecommitdiff
path: root/lib/util.h
Commit message (Collapse)AuthorAgeFilesLines
* util: New macro OBJECT_CONTAINING.Ben Pfaff2010-10-011-0/+10
| | | | | | This macro is a variant on CONTAINER_OF that takes an object pointer instead of a type name as its second argument. In the following commit this will simplify many users of CONTAINER_OF.
* treewide: Remove trailing whitespaceJoe Perches2010-08-301-1/+1
| | | | | | Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Simon Horman <horms@verge.net.au> Signed-off-by: Jesse Gross <jesse@nicira.com>
* util: Fix GCC false-positive warning for CONTAINER_OF.Ben Pfaff2010-05-071-1/+1
| | | | | | | | | | | | On sparc, GCC would issue the following warning for every use of CONTAINER_OF: warning: cast increases required alignment of target type This is a false positive: assuming that the data structure that it is applied to was allocated properly, the use of CONTAINER_OF to reach it is valid. And if it was not allocated properly, then code that accesses it other ways will have trouble too.
* util: New functions get_cwd(), abs_file_name().Ben Pfaff2010-03-181-0/+2
| | | | These will be used further in an upcoming commit.
* Merge "master" into "next".Ben Pfaff2010-02-241-2/+0
|\
| * util: Remove unused macros NOT_TESTED, NOT_IMPLEMENTED.Ben Pfaff2010-02-121-3/+1
| | | | | | | | Great ideas in theory, but we haven't used them.
* | Merge "master" into "next".Ben Pfaff2010-02-111-2/+2
|\ \ | |/ | | | | | | The main change here is the need to update all of the uses of UNUSED in the next branch to OVS_UNUSED as it is now spelled on "master".
* | Clean-up compiler warnings about ignoring return valuesJustin Pettit2009-12-151-0/+2
| | | | | | | | | | | | | | Some systems complain when certain functions' return values are not checked. This commit fixes those warnings. Creating ignore() function suggested by Ben Pfaff.
* | New dir_name() function plus tests.Ben Pfaff2009-11-041-0/+2
| |
* | Implement JSON parsing and serialization.Ben Pfaff2009-11-041-0/+4
| | | | | | | | This will be used by the upcoming Open vSwitch configuration database.
* | Add new function xzalloc(n) as a shorthand for xcalloc(1, n).Ben Pfaff2009-11-041-0/+1
|/
* util: Add comments.Ben Pfaff2009-09-171-0/+9
|
* bitmap: Don't allocate excessive memory.Ben Pfaff2009-09-171-1/+2
| | | | | | | | ROUND_UP rounds up to a multiple of a given value. That means that bitmap_allocate() was allocating one byte for each bit in the bitmap, which is clearly excessive. Instead, just allocate one bit for every bit in the bitmap.
* Update primary code license to Apache 2.0.Ben Pfaff2009-06-151-10/+10
|
* Import from old repository commit 61ef2b42a9c4ba8e1600f15bb0236765edc2ad45.v0.90.0Ben Pfaff2009-07-081-0/+117