[virt-tools-list] [PATCH] Don't check for NULL when it never can happen

Marc-André Lureau mlureau at redhat.com
Thu Jul 24 22:44:12 UTC 2014


ack

----- Original Message -----
> ---
>  src/virt-viewer-util.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/virt-viewer-util.c b/src/virt-viewer-util.c
> index 8aeec9f..655f489 100644
> --- a/src/virt-viewer-util.c
> +++ b/src/virt-viewer-util.c
> @@ -117,7 +117,7 @@ virt_viewer_util_extract_host(const char *uristr,
>      g_return_val_if_fail(uri != NULL, 1);
>  
>      if (host) {
> -        if (!uri || !uri->server) {
> +        if (!uri->server) {
>              *host = g_strdup("localhost");
>          } else {
>              if (uri->server[0] == '[') {
> --
> 1.9.3
> 
> _______________________________________________
> virt-tools-list mailing list
> virt-tools-list at redhat.com
> https://www.redhat.com/mailman/listinfo/virt-tools-list
> 




More information about the virt-tools-list mailing list