]> Git Repo - qemu.git/commit - block/qcow2.h
block: Eliminate the S_1KiB, S_2KiB, ... macros
authorMarkus Armbruster <[email protected]>
Fri, 11 Jan 2019 19:14:01 +0000 (20:14 +0100)
committerKevin Wolf <[email protected]>
Fri, 1 Feb 2019 12:46:45 +0000 (13:46 +0100)
commit14632122b82150d42cefac04a219bbead59bc4a7
tree53993ff87350059a20a3d8192026b273c0668dcc
parentd09ea2d22786e97c5c03cd4d4888f06bb89f8dc7
block: Eliminate the S_1KiB, S_2KiB, ... macros

We define 54 macros for the powers of two >= 1024.  We use six, in six
macro definitions.  Four of them could just as well use the common MiB
macro, so do that.  The remaining two can't, because they get passed
to stringify.  Replace the macro by the literal number there.
Slightly harder to read in one instance (1048576 vs. S_1MiB), so add a
comment there.  The other instance is a wash: 65536 vs S_64KiB.  65536
has been good enough for more than seven years there.

This effectively reverts commit 540b8492618 and 1240ac558d3.

Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Alberto Garcia <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
block/qcow2.h
block/vdi.c
include/qemu/units.h
This page took 0.024204 seconds and 4 git commands to generate.