changeset 514:f4410db9c934

Use sizeof().
author zas_
date Thu, 24 Apr 2008 15:31:21 +0000
parents 985fdfebd89e
children adc45cd3f08b
files src/ui_bookmark.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/ui_bookmark.c	Thu Apr 24 12:47:09 2008 +0000
+++ b/src/ui_bookmark.c	Thu Apr 24 15:31:21 2008 +0000
@@ -26,6 +26,7 @@
 #include "main.h"
 #include "filelist.h"
 
+#include "debug.h"
 #include "secure_save.h"
 #include "ui_bookmark.h"
 #include "ui_fileops.h"
@@ -94,14 +95,14 @@
 	if (!f) return FALSE;
 
 	/* first line must start with History comment */
-	if (!fgets(s_buf,1024,f) ||
+	if (!fgets(s_buf, sizeof(s_buf), f) ||
 	    strncmp(s_buf, "#History", 8) != 0)
 		{
 		fclose(f);
 		return FALSE;
 		}
 
-	while (fgets(s_buf,1024,f))
+	while (fgets(s_buf, sizeof(s_buf), f))
 		{
 		if (s_buf[0]=='#') continue;
 		if (s_buf[0]=='[')