Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Jun 2013 14:24:16 GMT
From:      Jonathan Anderson <jonathan@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 229892 for review
Message-ID:  <201306181424.r5IEOGVg019163@skunkworks.freebsd.org>

next in thread | raw e-mail | index | archive | help

http://p4web.freebsd.org/@@229892?ac=10

Change 229892 by jonathan@jonathan-on-joe on 2013/06/18 14:23:32

	As for the last change, use assert() for failures in finding the relevant tesla_class*.

Affected files ...

.. //depot/projects/ctsrd/tesla/src/sys/contrib/tesla/libtesla/tesla_update.c#8 edit

Differences ...

==== //depot/projects/ctsrd/tesla/src/sys/contrib/tesla/libtesla/tesla_update.c#8 (text+ko) ====

@@ -78,9 +78,8 @@
 	PRINT("store: 0x%tx\n", (intptr_t) store);
 
 	struct tesla_class *class;
-	int err = tesla_class_get(store, class_id, &class, name, description);
-	if (err != TESLA_SUCCESS)
-		return;
+	assert(tesla_class_get(store, class_id, &class, name, description)
+		== TESLA_SUCCESS);
 
 	print_class(class);
 
@@ -99,6 +98,7 @@
 	} clones[max_clones];
 
 	// Iterate over existing instances, figure out what to do with each.
+	int err = TESLA_SUCCESS;
 	for (uint32_t i = 0; i < class->tc_limit; i++) {
 		assert(class->tc_instances != NULL);
 		tesla_instance *inst = class->tc_instances + i;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201306181424.r5IEOGVg019163>