From ee7b9f1dfc4653cc8ce26d57cbed249d7f9cea4b Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 12 Oct 2018 19:02:23 +0200 Subject: [PATCH] format-table: don't use unsigned when there's no point in it CID 1394372 --- src/basic/format-table.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/basic/format-table.c b/src/basic/format-table.c index e30460eab6..5c99c398c2 100644 --- a/src/basic/format-table.c +++ b/src/basic/format-table.c @@ -73,11 +73,11 @@ typedef struct TableData { } TableData; static size_t TABLE_CELL_TO_INDEX(TableCell *cell) { - unsigned i; + size_t i; assert(cell); - i = PTR_TO_UINT(cell); + i = PTR_TO_SIZE(cell); assert(i > 0); return i-1; @@ -85,7 +85,7 @@ static size_t TABLE_CELL_TO_INDEX(TableCell *cell) { static TableCell* TABLE_INDEX_TO_CELL(size_t index) { assert(index != (size_t) -1); - return UINT_TO_PTR((unsigned) (index + 1)); + return SIZE_TO_PTR(index + 1); } struct Table {