aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2007-02-24 20:20:57 +0000
committerFelix Fietkau <nbd@openwrt.org>2007-02-24 20:20:57 +0000
commitaa222536022b384dc8b5ff996c21ab5451d1739a (patch)
tree98d6d0355a77a3be9242a9a9cc54d5857a105c0d
parentd398dc030991a13184fda482e38e201e308effa3 (diff)
downloadupstream-aa222536022b384dc8b5ff996c21ab5451d1739a.tar.gz
upstream-aa222536022b384dc8b5ff996c21ab5451d1739a.tar.bz2
upstream-aa222536022b384dc8b5ff996c21ab5451d1739a.zip
fix cylinder rounding in ptgen
SVN-Revision: 6352
-rw-r--r--tools/firmware-utils/src/ptgen.c2
1 files changed, 1 insertions, 1 deletions
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 */