aboutsummaryrefslogtreecommitdiffstats
path: root/src/state_file.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-03-26 10:38:48 +0000
committerEric Wong <normalperson@yhbt.net>2008-03-26 10:38:48 +0000
commit1d97bbbdd9d6015246b6b894dcc41209e7cce369 (patch)
tree7dd16d8e8f34fff4939a5cc058c4199f9af91921 /src/state_file.c
parente4779fa752e7426a25715c843b18c1fd95e77b9a (diff)
downloadmpd-1d97bbbdd9d6015246b6b894dcc41209e7cce369.tar.gz
mpd-1d97bbbdd9d6015246b6b894dcc41209e7cce369.tar.xz
mpd-1d97bbbdd9d6015246b6b894dcc41209e7cce369.zip
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
Diffstat (limited to '')
-rw-r--r--src/state_file.c4
1 files changed, 2 insertions, 2 deletions
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();