diff options
author | Lennart Poettering <lennart@poettering.net> | 2018-10-12 19:02:23 +0200 |
---|---|---|
committer | Sven Eden <sven.eden@prydeworx.com> | 2018-10-29 10:18:32 +0100 |
commit | b51458394dfa82168ab4a94a6b3d16557a6bf93f (patch) | |
tree | fbcaf7b3e8b2b4cc5e5ae094b1853541e8685614 /src/basic | |
parent | f9ae62d55010aac64b016023d45e3fe5606b3876 (diff) |
format-table: don't use unsigned when there's no point in it
CID 1394372
(cherry picked from commit ee7b9f1dfc4653cc8ce26d57cbed249d7f9cea4b)
Diffstat (limited to 'src/basic')
-rw-r--r-- | src/basic/format-table.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/basic/format-table.c b/src/basic/format-table.c index 2f1802954..d0305207e 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 { |