libnet: fix empty string test
authorRoni Häcki <roni.haecki@inf.ethz.ch>
Mon, 7 Oct 2019 13:21:51 +0000 (15:21 +0200)
committerRoni Häcki <roni.haecki@inf.ethz.ch>
Mon, 7 Oct 2019 13:21:51 +0000 (15:21 +0200)
Signed-off-by: Roni Häcki <roni.haecki@inf.ethz.ch>

lib/net/net_queue.c

index e7f9fd8..3929d78 100644 (file)
@@ -87,7 +87,7 @@ static errval_t create_mlx4_queue(const char* cardname, inthandler_t interrupt,
     struct pci_id id;
     struct pci_class cls;
 
-    if (strncmp(cardname, "", strlen("")) != 0) {
+    if (cardname[0] != '\0') {
         if (cardname[4] != ':') {
             return DEVQ_ERR_INIT_QUEUE;
         }