X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fsset.h;h=f63f4ab9e4794c40a1e5b3ba026082de79af8192;hb=3dd3eace3f21c53ac59e717624eae12d37554895;hp=7f9e1250c919fa741b9eda0f9ac493069bb5068d;hpb=e0edde6fee279cdbbf3c179f5f50adaf0c7c7f1e;p=openvswitch diff --git a/lib/sset.h b/lib/sset.h index 7f9e1250..f63f4ab9 100644 --- a/lib/sset.h +++ b/lib/sset.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 Nicira, Inc. + * Copyright (c) 2011, 2012 Nicira, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,6 +18,7 @@ #define SSET_H #include "hmap.h" +#include "util.h" #ifdef __cplusplus extern "C" { @@ -82,7 +83,7 @@ bool sset_equals(const struct sset *, const struct sset *); #define SSET_NODE_FROM_HMAP_NODE(HMAP_NODE) \ CONTAINER_OF(HMAP_NODE, struct sset_node, hmap_node) #define SSET_NAME_FROM_HMAP_NODE(HMAP_NODE) \ - ((const char *) (SSET_NODE_FROM_HMAP_NODE(HMAP_NODE)->name)) + (CONST_CAST(const char *, (SSET_NODE_FROM_HMAP_NODE(HMAP_NODE)->name))) #define SSET_NODE_FROM_NAME(NAME) CONTAINER_OF(NAME, struct sset_node, name) #define SSET_FIRST(SSET) SSET_NAME_FROM_HMAP_NODE(hmap_first(&(SSET)->map)) #define SSET_NEXT(SSET, NAME) \