From 55fb732d03358caa22b72d83d2e406f2e33bb61a Mon Sep 17 00:00:00 2001 From: giraffedata Date: Sat, 12 Jul 2008 20:16:52 +0000 Subject: cleanup git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@670 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- other/pamdepth.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'other/pamdepth.c') diff --git a/other/pamdepth.c b/other/pamdepth.c index 0c4490ed..ee59a408 100644 --- a/other/pamdepth.c +++ b/other/pamdepth.c @@ -11,8 +11,9 @@ =============================================================================*/ #include -#include "shhopt.h" +#include "pm_c_util.h" #include "mallocvar.h" +#include "shhopt.h" #include "pam.h" struct cmdlineInfo { @@ -89,7 +90,7 @@ createSampleMap(sample const oldMaxval, MALLOCARRAY_NOFAIL(sampleMap, oldMaxval+1); for (i = 0; i <= oldMaxval; ++i) - sampleMap[i] = (i * newMaxval + oldMaxval / 2) / oldMaxval; + sampleMap[i] = ROUNDDIV(i * newMaxval, oldMaxval); *sampleMapP = sampleMap; } -- cgit 1.4.1