diff mbox

[ovs-dev,v2,1/3] pvector: Move PVECTOR_EXTRA_ALLOC to pvector.c.

Message ID 1467807977-97753-1-git-send-email-jarno@ovn.org
State Accepted
Headers show

Commit Message

Jarno Rajahalme July 6, 2016, 12:26 p.m. UTC
There is no need to expose PVECTOR_EXTRA_ALLOC in the API.

Suggested-by: Ben Pfaff <blp@ovn.org>
Signed-off-by: Jarno Rajahalme <jarno@ovn.org>
---
 lib/pvector.c | 6 +++++-
 lib/pvector.h | 6 +-----
 2 files changed, 6 insertions(+), 6 deletions(-)

Comments

Ben Pfaff July 22, 2016, 9:44 p.m. UTC | #1
On Wed, Jul 06, 2016 at 05:26:15AM -0700, Jarno Rajahalme wrote:
> There is no need to expose PVECTOR_EXTRA_ALLOC in the API.
> 
> Suggested-by: Ben Pfaff <blp@ovn.org>
> Signed-off-by: Jarno Rajahalme <jarno@ovn.org>

Acked-by: Ben Pfaff <blp@ovn.org>
diff mbox

Patch

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. */