--- ftk/src/ftk.h
+++ ftk/src/ftk.h
@@ -330,8 +330,10 @@
 		#endif
 
 		#if defined( FLM_WIN) || defined( FLM_NLM)
+			#define FLMATOMIC_RET		long
 			#define FLMATOMIC		volatile long
 		#else
+			#define FLMATOMIC_RET		int
 			#define FLMATOMIC		volatile int
 		#endif
 	
@@ -3943,7 +3945,7 @@
 	} F_TMSTAMP;
 
 	#define f_timeIsLeapYear(year) \
-		((((year) & 0x03) == 0) && (((year) % 100) != 0) || (((year) % 400) == 0))
+		(((((year) & 0x03) == 0) && (((year) % 100) != 0)) || (((year) % 400) == 0))
 
 	void f_timeGetSeconds(
 		FLMUINT	*		puiSeconds);
--- ftk/src/ftksys.h
+++ ftk/src/ftksys.h
@@ -218,7 +218,7 @@
 	Desc:
 	**********************************************************************/
 	#if defined( FLM_PPC) && defined( FLM_GNUC) && defined( FLM_LINUX)
-		extern "C"  FLMATOMIC ppc_atomic_add(
+		extern "C"  FLMATOMIC_RET ppc_atomic_add(
 			FLMATOMIC *		piTarget,
 			FLMINT32			iDelta);
 	#endif
@@ -227,7 +227,7 @@
 	Desc:
 	**********************************************************************/
 	#if defined( FLM_PPC) && defined( FLM_GNUC) && defined( FLM_LINUX)
-		extern "C"  FLMATOMIC ppc_atomic_xchg(
+		extern "C"  FLMATOMIC_RET ppc_atomic_xchg(
 			FLMATOMIC *		piTarget,
 			FLMATOMIC		iNewValue);
 	#endif
--- ftk/src/ftkunix.cpp
+++ ftk/src/ftkunix.cpp
@@ -1356,7 +1356,7 @@
 Desc:
 ****************************************************************************/
 #if defined( FLM_PPC) && defined( FLM_GNUC)
-FLMATOMIC ppc_atomic_add(
+FLMATOMIC_RET ppc_atomic_add(
 	FLMATOMIC *		piTarget,
 	FLMINT32			iDelta)
 {
@@ -1381,7 +1381,7 @@
 Desc:
 ****************************************************************************/
 #if defined( FLM_PPC) && defined( FLM_GNUC)
-FLMATOMIC ppc_atomic_xchg(
+FLMATOMIC_RET ppc_atomic_xchg(
 	FLMATOMIC *		piTarget,
 	FLMATOMIC		iNewValue)
 {
--- src/kybuild.cpp
+++ src/kybuild.cpp
@@ -534,8 +534,8 @@
 				if (pIxd->uiFlags & IXD_OFFLINE)
 				{
 					if (uiContainerNum > pIxd->uiLastContainerIndexed ||
-						 uiContainerNum == pIxd->uiLastContainerIndexed &&
-						 uiDrn > pIxd->uiLastDrnIndexed)
+						 ( uiContainerNum == pIxd->uiLastContainerIndexed &&
+						 uiDrn > pIxd->uiLastDrnIndexed ) )
 					{
 						continue;
 					}