PERFORCE change 140295 for review

Hans Petter Selasky hselasky at FreeBSD.org
Sun Apr 20 14:19:23 UTC 2008


http://perforce.freebsd.org/chv.cgi?CH=140295

Change 140295 by hselasky at hselasky_laptop001 on 2008/04/20 14:18:21

	
	Fix compiler warning.

Affected files ...

.. //depot/projects/usb/src/sys/dev/usb/ucom.c#30 edit

Differences ...

==== //depot/projects/usb/src/sys/dev/usb/ucom.c#30 (text+ko) ====

@@ -205,8 +205,6 @@
 			ucom_bitmap[x / 8] |= (1 << (x % 8));
 		}
 
-		*p_root_unit = n;
-
 		error = 0;
 
 		break;
@@ -216,6 +214,12 @@
 
 	mtx_unlock(&Giant);
 
+	/*
+	 * Always set the variable pointed to by "p_root_unit" so that
+	 * the compiler does not think that it is used uninitialised:
+	 */
+	*p_root_unit = n;
+
 	return (error);
 }
 


More information about the p4-projects mailing list