2
0
mirror of https://github.com/xcat2/xNBA.git synced 2024-12-14 23:31:39 +00:00

uri_get(NULL) and uri_put(NULL) are explicitly allowed.

This commit is contained in:
Michael Brown 2007-08-02 20:26:49 +01:00
parent d4947c05b2
commit 49009a4c1b
2 changed files with 4 additions and 5 deletions

View File

@ -33,10 +33,9 @@ struct uri *cwuri = NULL;
/**
* Change working URI
*
* @v uri New working URI
* @v uri New working URI, or NULL
*/
void churi ( struct uri *uri ) {
if ( cwuri )
uri_put ( cwuri );
uri_put ( cwuri );
cwuri = uri_get ( uri );
}

View File

@ -105,8 +105,8 @@ static inline int uri_has_relative_path ( struct uri *uri ) {
/**
* Increment URI reference count
*
* @v uri URI
* @ret uri URI
* @v uri URI, or NULL
* @ret uri URI as passed in
*/
static inline __attribute__ (( always_inline )) struct uri *
uri_get ( struct uri *uri ) {