From aa222536022b384dc8b5ff996c21ab5451d1739a Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sat, 24 Feb 2007 20:20:57 +0000 Subject: [PATCH] fix cylinder rounding in ptgen SVN-Revision: 6352 --- 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 2d78eae53514..277fbbc13402 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 */ -- 2.30.2