X-Git-Url: http://git.etherboot.org/people/sha0/gpxe.git/blobdiff_plain/edded7546e392079d824e62e6843a62f17927ef7..ed20fee0cfc5863b308d22abc17a7dbb4327c90f:/src/core/refcnt.c diff --git a/src/core/refcnt.c b/src/core/refcnt.c index 36b7ce22..30bb6dea 100644 --- a/src/core/refcnt.c +++ b/src/core/refcnt.c @@ -29,18 +29,18 @@ * Increment reference count * * @v refcnt Reference counter, or NULL + * @ret refcnt Reference counter * * If @c refcnt is NULL, no action is taken. */ -void ref_get ( struct refcnt *refcnt ) { +struct refcnt * ref_get ( struct refcnt *refcnt ) { - if ( ! refcnt ) - return; - - refcnt->refcnt++; - - DBGC2 ( refcnt, "REFCNT %p incremented to %d\n", - refcnt, refcnt->refcnt ); + if ( refcnt ) { + refcnt->refcnt++; + DBGC2 ( refcnt, "REFCNT %p incremented to %d\n", + refcnt, refcnt->refcnt ); + } + return refcnt; } /**