From 1d97bbbdd9d6015246b6b894dcc41209e7cce369 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 26 Mar 2008 10:38:48 +0000 Subject: unsigned counters Use unsigned variables for storing the count of items or for iteration variables. Since there can never be a negative number of items, it makes sense to use an unsigned data type here. This change is safe because the unsigned values are only used for adddressing array items. git-svn-id: https://svn.musicpd.org/mpd/trunk@7214 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/state_file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/state_file.c') diff --git a/src/state_file.c b/src/state_file.c index a4b2c108f..3bc4f8f0c 100644 --- a/src/state_file.c +++ b/src/state_file.c @@ -50,7 +50,7 @@ static void get_state_file_path(void) void write_state_file(void) { - int i; + unsigned int i; FILE *fp; if (!sfpath) @@ -72,7 +72,7 @@ void write_state_file(void) void read_state_file(void) { struct stat st; - int i; + unsigned int i; FILE *fp; get_state_file_path(); -- cgit v1.2.3