There is no need to expose PVECTOR_EXTRA_ALLOC in the API. Suggested-by: Ben Pfaff <b...@ovn.org> Signed-off-by: Jarno Rajahalme <ja...@ovn.org> --- lib/pvector.c | 6 +++++- lib/pvector.h | 6 +----- 2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/lib/pvector.c b/lib/pvector.c index fd30819..04c2e65 100644 --- a/lib/pvector.c +++ b/lib/pvector.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 Nicira, Inc. + * Copyright (c) 2014, 2016 Nicira, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,6 +17,10 @@ #include <config.h> #include "pvector.h" +/* Writers will preallocate space for some entries at the end to avoid future + * reallocations. */ +enum { PVECTOR_EXTRA_ALLOC = 4 }; + static struct pvector_impl * pvector_impl_get(const struct pvector *pvec) { diff --git a/lib/pvector.h b/lib/pvector.h index 7e2164c..263e783 100644 --- a/lib/pvector.h +++ b/lib/pvector.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 Nicira, Inc. + * Copyright (c) 2014, 2016 Nicira, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -63,10 +63,6 @@ struct pvector_entry { void *ptr; }; -/* Writers will preallocate space for some entries at the end to avoid future - * reallocations. */ -enum { PVECTOR_EXTRA_ALLOC = 4 }; - struct pvector_impl { size_t size; /* Number of entries in the vector. */ size_t allocated; /* Number of allocated entries. */ -- 2.1.4 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev