aboutsummaryrefslogtreecommitdiffstats
path: root/tools
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
commitccc7465f7afb84ceca1f2a5eb37f8be59a758239 (patch)
treee56127c98e4df5e95aa34a867669c4076fce5ae9 /tools
parentf06ef1e70657491cd486ccc7e81ec3a98b0a25dd (diff)
downloadupstream-ccc7465f7afb84ceca1f2a5eb37f8be59a758239.tar.gz
upstream-ccc7465f7afb84ceca1f2a5eb37f8be59a758239.tar.bz2
upstream-ccc7465f7afb84ceca1f2a5eb37f8be59a758239.zip
fix cylinder rounding in ptgen
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@6352 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'tools')
-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 */