[xiph-commits] r13440 - trunk/ezstream/src

moritz at svn.xiph.org moritz at svn.xiph.org
Sat Aug 4 10:10:29 PDT 2007


Author: moritz
Date: 2007-08-04 10:10:29 -0700 (Sat, 04 Aug 2007)
New Revision: 13440

Modified:
   trunk/ezstream/src/playlist.c
Log:
Sprinkle in some consistency ...


Modified: trunk/ezstream/src/playlist.c
===================================================================
--- trunk/ezstream/src/playlist.c	2007-08-04 17:09:19 UTC (rev 13439)
+++ trunk/ezstream/src/playlist.c	2007-08-04 17:10:29 UTC (rev 13440)
@@ -242,41 +242,39 @@
 }
 
 void
-playlist_free(playlist_t **pl)
+playlist_free(playlist_t **pl_p)
 {
 	size_t		 i;
-	playlist_t	*tmp;
+	playlist_t	*pl;
 
-	if (pl == NULL || *pl == NULL)
+	if (pl_p == NULL || (pl = *pl_p) == NULL)
 		return;
 
-	tmp = *pl;
-
-	if (tmp->filename != NULL) {
-		xfree(tmp->filename);
-		tmp->filename = NULL;
+	if (pl->filename != NULL) {
+		xfree(pl->filename);
+		pl->filename = NULL;
 	}
 
-	if (tmp->list != NULL) {
-		if (tmp->size > 0) {
-			for (i = 0; i < tmp->size / sizeof(char *); i++) {
-				if (tmp->list[i] != NULL) {
-					xfree(tmp->list[i]);
-					tmp->list[i] = NULL;
+	if (pl->list != NULL) {
+		if (pl->size > 0) {
+			for (i = 0; i < pl->size / sizeof(char *); i++) {
+				if (pl->list[i] != NULL) {
+					xfree(pl->list[i]);
+					pl->list[i] = NULL;
 				} else
 					break;
 			}
 		}
 
-		xfree(tmp->list);
+		xfree(pl->list);
 	}
 
-	if (tmp->prog_track != NULL) {
-		xfree(tmp->prog_track);
-		tmp->prog_track = NULL;
+	if (pl->prog_track != NULL) {
+		xfree(pl->prog_track);
+		pl->prog_track = NULL;
 	}
 
-	xfree(*pl);
+	xfree(*pl_p);
 }
 
 const char *



More information about the commits mailing list