summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-02-24 20:20:57 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-02-24 20:20:57 +0000
commitbec946377a21da969360927ccc3f7ea4225476df (patch)
treee56127c98e4df5e95aa34a867669c4076fce5ae9
parentea4e6a2593d6bc6244cb4d46077fceaf0169e098 (diff)
fix cylinder rounding in ptgen
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@6352 3c298f89-4303-0410-b956-a3cf2f4a3e73
-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 */