examples/l2fwd-crypto: use key-value list of supported algorithms
[dpdk.git] / examples / vhost_xen / vhost_monitor.c
index 6455993..605cd4d 100644 (file)
@@ -97,14 +97,14 @@ init_watch(void)
        xs = xs_daemon_open();
        if (xs == NULL) {
                RTE_LOG(ERR, XENHOST, "xs_daemon_open failed\n");
-               return (-1);
+               return -1;
        }
 
        ret = xs_watch(xs, "/local/domain", "mytoken");
        if (ret == 0) {
                RTE_LOG(ERR, XENHOST, "%s: xs_watch failed\n", __func__);
                xs_daemon_close(xs);
-               return (-1);
+               return -1;
        }
 
        /* We are notified of read availability on the watch via the file descriptor. */
@@ -126,7 +126,7 @@ get_xen_guest(int dom_id)
                        return guest;
        }
 
-       return (NULL);
+       return NULL;
 }
 
 
@@ -181,8 +181,8 @@ add_config_ll_entry(struct virtio_net_config_ll *new_ll_dev)
                        ll_root = new_ll_dev;
                } else {
                        /* increment through the ll until we find un unused device_id,
-                        * insert the device at that entry
-                        */
+                        * insert the device at that entry
+                        */
                        while ((ll_dev->next != NULL) && (ll_dev->dev.device_fh == (ll_dev->next->dev.device_fh - 1)))
                                ll_dev = ll_dev->next;
 
@@ -296,8 +296,7 @@ virtio_net_config_ll *new_device(unsigned int virtio_idx, struct xen_guest *gues
        add_config_ll_entry(new_ll_dev);
        return new_ll_dev;
 err:
-       if (new_ll_dev)
-               free(new_ll_dev);
+       free(new_ll_dev);
        rte_free(virtqueue_rx);
        rte_free(virtqueue_tx);
 
@@ -590,5 +589,3 @@ init_virtio_xen(struct virtio_net_device_ops const *const ops)
                return -1;
        return 0;
 }
-
-