aboutsummaryrefslogtreecommitdiffstats
path: root/src/tag.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-08-28 20:02:16 +0200
committerMax Kellermann <max@duempel.org>2008-08-28 20:02:16 +0200
commit801c71ed1c02a1505ef64902f6557fdfe1749a96 (patch)
tree3a9b9d038a6a08938d1518f93434468f0e1408a1 /src/tag.c
parent1560a70b01e1883d2cf6d444cef26f28753bb94e (diff)
downloadmpd-801c71ed1c02a1505ef64902f6557fdfe1749a96.tar.gz
mpd-801c71ed1c02a1505ef64902f6557fdfe1749a96.tar.xz
mpd-801c71ed1c02a1505ef64902f6557fdfe1749a96.zip
unsigned integers and size_t
Use "unsigned int" whenever negative values are not meaningful. Use size_t whenever we are going to describe buffer sizes.
Diffstat (limited to 'src/tag.c')
-rw-r--r--src/tag.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/tag.c b/src/tag.c
index fc85a6ff9..00f09f10f 100644
--- a/src/tag.c
+++ b/src/tag.c
@@ -25,7 +25,6 @@
#include "charConv.h"
#include "tagTracker.h"
#include "song.h"
-#include "os_compat.h"
#ifdef HAVE_ID3TAG
# define isId3v1(tag) (id3_tag_options(tag, 0, 0) & ID3_TAG_OPTION_ID3V1)
@@ -698,9 +697,9 @@ int mpdTagsAreEqual(MpdTag * tag1, MpdTag * tag2)
}
static void appendToTagItems(MpdTag * tag, enum tag_type type,
- char *value, int len)
+ char *value, size_t len)
{
- int i = tag->numOfItems;
+ unsigned int i = tag->numOfItems;
char *duplicated = xmalloc(len + 1);
memcpy(duplicated, value, len);
@@ -719,7 +718,7 @@ static void appendToTagItems(MpdTag * tag, enum tag_type type,
}
void addItemToMpdTagWithLen(MpdTag * tag, enum tag_type itemType,
- char *value, int len)
+ char *value, size_t len)
{
if (ignoreTagItems[itemType])
{