[PATCH conntrack-tools v2 2/3] conntrackd: use size_t for element indices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


The indices of the allocated vector data can be represented more
precisely by using size_t as the index type. The size_t type integer
is used in memory allocation routines and is capable of handling any
allocated object size or index.

Signed-off-by: Donald Yandt <donald.yandt@xxxxxxxxx>
 src/vector.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/vector.c b/src/vector.c
index 0af8db7..fb1014f 100644
--- a/src/vector.c
+++ b/src/vector.c
@@ -23,9 +23,7 @@
 struct vector {
 	char *data;
-	unsigned int cur_elems;
-	unsigned int max_elems;
-	size_t size;
+	size_t cur_elems, max_elems, size;

[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux