diff src/layout.c @ 1177:5a20c47e7a14

Fix up unsigned expression always true/false warnings.
author zas_
date Tue, 25 Nov 2008 17:01:03 +0000
parents 0bea79d87065
children 31402ecb2aed
line wrap: on
line diff
--- a/src/layout.c	Sun Nov 23 22:05:27 2008 +0000
+++ b/src/layout.c	Tue Nov 25 17:01:03 2008 +0000
@@ -1922,8 +1922,10 @@
 
 	layout_config_parse(options->layout.style, options->layout.order,
 			    &lw->dir_location,  &lw->file_location, &lw->image_location);
-	lw->dir_view_type = CLAMP(options->layout.dir_view_type, 0, VIEW_DIR_TYPES_COUNT - 1);
-	lw->file_view_type = CLAMP(options->layout.file_view_type, 0, VIEW_FILE_TYPES_COUNT - 1);
+	lw->dir_view_type = options->layout.dir_view_type;
+    if (lw->dir_view_type >= VIEW_DIR_TYPES_COUNT) lw->dir_view_type = 0;
+	lw->file_view_type = options->layout.file_view_type;
+    if (lw->file_view_type >= VIEW_FILE_TYPES_COUNT) lw->file_view_type = 0;
 
 	/* divider positions */