2
0
mirror of https://github.com/xcat2/xNBA.git synced 2024-11-22 01:21:45 +00:00

[uri] Special case NULL in churi()

resolve_uri() doesn't (and probably shouldn't) handle NULL relative_uri.

Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com>
Reviewed-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Marty Connor <mdc@etherboot.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Piotr Jaroszyński 2010-04-12 17:37:10 +02:00 committed by Michael Brown
parent 4cb0bfe291
commit 61206c245d

View File

@ -38,9 +38,11 @@ struct uri *cwuri = NULL;
* @v uri New working URI, or NULL
*/
void churi ( struct uri *uri ) {
struct uri *new_uri;
struct uri *new_uri = NULL;
if ( uri )
new_uri = resolve_uri ( cwuri, uri );
new_uri = resolve_uri ( cwuri, uri );
uri_put ( cwuri );
cwuri = new_uri;
}