From c5b524e3762723a200156b79efd58192db320e5b Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 26 Mar 2008 10:37:36 +0000 Subject: 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 --- src/tag.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/tag.c') 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) -- cgit v1.2.3