From: Felix Fietkau Date: Sat, 24 Feb 2007 20:20:57 +0000 (+0000) Subject: fix cylinder rounding in ptgen X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=a298587a9e5f1673decdfd5e2e0d8a1e9a5d68ba;p=project%2Ffirmware-utils.git fix cylinder rounding in ptgen SVN-Revision: 6352 --- diff --git a/src/ptgen.c b/src/ptgen.c index 2d78eae..277fbbc 100644 --- a/src/ptgen.c +++ b/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 */