|
@@ -29,18 +29,18 @@
|
29
|
29
|
* Increment reference count
|
30
|
30
|
*
|
31
|
31
|
* @v refcnt Reference counter, or NULL
|
|
32
|
+ * @ret refcnt Reference counter
|
32
|
33
|
*
|
33
|
34
|
* If @c refcnt is NULL, no action is taken.
|
34
|
35
|
*/
|
35
|
|
-void ref_get ( struct refcnt *refcnt ) {
|
|
36
|
+struct refcnt * ref_get ( struct refcnt *refcnt ) {
|
36
|
37
|
|
37
|
|
- if ( ! refcnt )
|
38
|
|
- return;
|
39
|
|
-
|
40
|
|
- refcnt->refcnt++;
|
41
|
|
-
|
42
|
|
- DBGC2 ( refcnt, "REFCNT %p incremented to %d\n",
|
43
|
|
- refcnt, refcnt->refcnt );
|
|
38
|
+ if ( refcnt ) {
|
|
39
|
+ refcnt->refcnt++;
|
|
40
|
+ DBGC2 ( refcnt, "REFCNT %p incremented to %d\n",
|
|
41
|
+ refcnt, refcnt->refcnt );
|
|
42
|
+ }
|
|
43
|
+ return refcnt;
|
44
|
44
|
}
|
45
|
45
|
|
46
|
46
|
/**
|