From bec946377a21da969360927ccc3f7ea4225476df Mon Sep 17 00:00:00 2001 From: nbd Date: Sat, 24 Feb 2007 20:20:57 +0000 Subject: fix cylinder rounding in ptgen git-svn-id: svn://svn.openwrt.org/openwrt/trunk@6352 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- tools/firmware-utils/src/ptgen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/firmware-utils/src/ptgen.c b/tools/firmware-utils/src/ptgen.c index 2d78eae535..277fbbc134 100644 --- a/tools/firmware-utils/src/ptgen.c +++ b/tools/firmware-utils/src/ptgen.c @@ -114,7 +114,7 @@ static void to_chs(long sect, unsigned char chs[3]) { static inline unsigned long round_to_cyl(long sect) { int cyl_size = heads * sectors; - return sect + cyl_size - ((sect % cyl_size) ?: cyl_size); + return sect + cyl_size - (sect % cyl_size); } /* check the partition sizes and write the partition table */ -- cgit v1.2.3