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
This commit is contained in:
Max Kellermann
2008-03-26 10:38:48 +00:00
committed by Eric Wong
parent e4779fa752
commit 1d97bbbdd9
2 changed files with 13 additions and 13 deletions

View File

@@ -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();