diff --git a/configure.ac b/configure.ac --- a/configure.ac +++ b/configure.ac @@ -65,7 +65,7 @@ PKGCONFIG_OHNOWRAP([CHECK], [check >= 0. # define paths for configuration files: AC_DEFINE_DIR([LOCALSTATEDIR], [localstatedir], [Default directory for storing state information]) -AC_DEFINE_DIR([RUNSTATEDIR], [runstatedir], [Default directory for registering runtime information like pid-files]) +AC_DEFINE_DIR([RUNSTATEDIR], [localstatedir/run], [Default directory for registering runtime information like pid-files]) AC_CONFIG_FILES([Makefile src/Makefile diff --git a/src/Makefile.am b/src/Makefile.am --- a/src/Makefile.am +++ b/src/Makefile.am @@ -3,7 +3,6 @@ SUBDIRS = . tests AM_CPPFLAGS = -DSYSCONFDIR='"$(sysconfdir)"' \ -DLOCALSTATEDIR='"$(localstatedir)"' \ - -DRUNSTATEDIR='"$(localstatedir)/run"' \ -I. -I$(top_srcdir)/src/common AM_CFLAGS = $(DISTLIBS_CFLAGS) AM_LDFLAGS = $(DISTLIBS_LDFLAGS) diff --git a/src/server/distrend.c b/src/server/distrend.c --- a/src/server/distrend.c +++ b/src/server/distrend.c @@ -45,9 +45,6 @@ #include #include -/* local defs */ -#define NUMBER_ELEVEN 11 - /* ******************* Structs ************************ */ struct general_info @@ -523,7 +520,7 @@ int find_jobframe_new(struct general_inf /** Why is the number 11 found here again? --ohnobinki */ - power_difference = (((float)geninfo->total_render_power / (float)geninfo->total_priority_pieces) * (NUMBER_ELEVEN - (float)distrenjob_ptr->priority)); + power_difference = (((float)geninfo->total_render_power / (float)geninfo->total_priority_pieces) * ((float)distrenjob_ptr->priority)); power_difference = power_difference - (float)distrenjob_ptr->assigned_render_power; fprintf(stderr, "job num %d\npower difference: %f\n", distrenjob_ptr->jobnum, power_difference); @@ -896,7 +893,7 @@ int update_xml_joblist(struct general_in Why the random constant numeral 11? --ohnobinki */ - geninfo->total_priority_pieces = geninfo->total_priority_pieces + (NUMBER_ELEVEN - job->priority); + geninfo->total_priority_pieces = geninfo->total_priority_pieces + job->priority; counter++; }