summaryrefslogtreecommitdiff
path: root/src/tag.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-03-26 10:37:36 +0000
committerEric Wong <normalperson@yhbt.net>2008-03-26 10:37:36 +0000
commitc5b524e3762723a200156b79efd58192db320e5b (patch)
tree9dac5dabb515cfab1b68afc88739bc3937b3f26d /src/tag.c
parent54b544c2f4c0b5425d6ff12596a9e82fd8d783d2 (diff)
eliminated duplicate initialization
Local variables which are never read before the first assignment don't need initialization. Saves a few bytes of text. Also don't reset variables which are never read until function return. git-svn-id: https://svn.musicpd.org/mpd/trunk@7199 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/tag.c')
-rw-r--r--src/tag.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/tag.c b/src/tag.c
index cfda3add1..b3645e007 100644
--- a/src/tag.c
+++ b/src/tag.c
@@ -137,7 +137,7 @@ void printMpdTag(int fd, MpdTag * tag)
*/
static id3_utf8_t * processID3FieldString (int is_id3v1, const id3_ucs4_t *ucs4, int type)
{
- id3_utf8_t *utf8 = NULL;
+ id3_utf8_t *utf8;
id3_latin1_t *isostr;
char *encoding;
@@ -174,7 +174,7 @@ static MpdTag *getID3Info(
{
struct id3_frame const *frame;
id3_ucs4_t const *ucs4;
- id3_utf8_t *utf8 = NULL;
+ id3_utf8_t *utf8;
union id3_field const *field;
unsigned int nstrings;
int i;
@@ -462,7 +462,7 @@ MpdTag *id3Dup(char *file)
MpdTag *apeDup(char *file)
{
MpdTag *ret = NULL;
- FILE *fp = NULL;
+ FILE *fp;
int tagCount;
char *buffer = NULL;
char *p;
@@ -613,7 +613,7 @@ static void deleteItem(MpdTag * tag, int idx)
void clearItemsFromMpdTag(MpdTag * tag, int type)
{
- int i = 0;
+ int i;
for (i = 0; i < tag->numOfItems; i++) {
if (tag->items[i].type == type) {
@@ -650,7 +650,7 @@ void freeMpdTag(MpdTag * tag)
MpdTag *mpdTagDup(MpdTag * tag)
{
- MpdTag *ret = NULL;
+ MpdTag *ret;
int i;
if (!tag)