[Debburn-devel] [PATCH] uninitialized var fixes

Lorenz Minder lminder at gmx.net
Wed Sep 27 21:36:33 UTC 2006


Hi,

this patch fixes use of uninitialized variables, and missing return
statements.

BIG FAT WARNING: This change is UNTESTED. I have no DVD burning
facilities for testing.

--Lorenz

Index: cdrecord/drv_mmc.c
===================================================================
--- cdrecord/drv_mmc.c	(revision 351)
+++ cdrecord/drv_mmc.c	(working copy)
@@ -2777,7 +2780,8 @@
 	  scsi_close_tr_session(scgp, CL_TYPE_FINALISE_MINRAD, 0, FALSE);
       }
       scg_settimeout(scgp, 200);
-      
+
+      return 0;
 }
 
 char	*blank_types[] = {
@@ -2860,11 +2863,11 @@
 	printf("format_mdvd: media is a DVD+RW.\n");
 	dip = (struct disk_info *)buf;
 	if (get_diskinfo(scgp, dip) < 0)
-		return ret;
+		return -1;
 	
 	if (dip->disk_status & 3 && formattype != FORCE_FORMAT) {
 		printf("Error: disk already formated, ignoring.\n");
-	        return ret;
+	        return -1;
         }
 	addr[0] = 0;           /* "Reserved" */
 	addr[1] = 2;           /* "IMMED" flag */



More information about the Debburn-devel mailing list