Skip to contentSkip to conversation

examples/vhost_crypto: fix bracket

PATCH Applied Fan Zhang 2 participants 3 messages Dec 11, 2018

lore
Share & tools
lore

Fan Zhang

author
#0 lore raw

PATCH 1/1 examples/vhost_crypto: fix bracket

This patch fixes a missed bracket bug in the code.

Fixes e1d90eaa83ff ("examples/vhost_crypto: fix zero copy")
---
 examples/vhost_crypto/main.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
examples/vhost_crypto/main.c +5 -4
index f08babd97..3deb5263f 100644
@@ -503,11 +503,12 @@ main(int argc, char *argv[])
 			if (strstr(dev_info.driver_name,
 				RTE_STR(VHOST_CRYPTO_CDEV_NAME_AESNI_MB_PMD)) ||
 				strstr(dev_info.driver_name,
-				RTE_STR(VHOST_CRYPTO_CDEV_NAME_AESNI_GCM_PMD)))
-			RTE_LOG(ERR, USER1, "Cannot enable zero-copy in %s\n",
+				RTE_STR(VHOST_CRYPTO_CDEV_NAME_AESNI_GCM_PMD))) {
+				RTE_LOG(ERR, USER1, "Cannot enable zero-copy in %s\n",
 					dev_info.driver_name);
-			ret = -EPERM;
-			goto error_exit;
+				ret = -EPERM;
+				goto error_exit;
+			}
 		}
 
 		if (dev_info.max_nb_queue_pairs < info->qid + 1) {
Signature · 1 line
2.13.6
Reviewed-by on v1 1/1
#1 lore raw
Quoted 22 lines · Fan Zhang

This patch fixes a missed bracket bug in the code.

Fixes e1d90eaa83ff ("examples/vhost_crypto: fix zero copy")
---
  examples/vhost_crypto/main.c | 9 +++++----
  1 file changed, 5 insertions(+), 4 deletions(-)
examples/vhost_crypto/main.c +1 -2
index f08babd97..3deb5263f 100644
@@ -503,11 +503,12 @@ main(int argc, char *argv[])
  			if (strstr(dev_info.driver_name,
  				RTE_STR(VHOST_CRYPTO_CDEV_NAME_AESNI_MB_PMD)) ||
  				strstr(dev_info.driver_name,
-				RTE_STR(VHOST_CRYPTO_CDEV_NAME_AESNI_GCM_PMD)))
-			RTE_LOG(ERR, USER1, "Cannot enable zero-copy in %s\n",
+				RTE_STR(VHOST_CRYPTO_CDEV_NAME_AESNI_GCM_PMD))) {

examples/vhost_crypto/main.c main(int argc, char *argv[]) · line 514

Quoted 10 lines
examples/vhost_crypto/main.c +4 -2
+				RTE_LOG(ERR, USER1, "Cannot enable zero-copy in %s\n",
  					dev_info.driver_name);
-			ret = -EPERM;
-			goto error_exit;
+				ret = -EPERM;
+				goto error_exit;
+			}
  		}
 
  		if (dev_info.max_nb_queue_pairs < info->qid + 1) {

Thanks,
Maxime