Sfoglia il codice sorgente

【完善】del 函数返回逻辑

SummerGift 6 anni fa
parent
commit
ebaaf8f0d1
1 ha cambiato i file con 1 aggiunte e 3 eliminazioni
  1. 1 3
      src/lssdp_service.c

+ 1 - 3
src/lssdp_service.c

@@ -129,10 +129,8 @@ int lssdp_service_del(struct lssdp_service *h)
     if (h == RT_NULL)
     if (h == RT_NULL)
         return -RT_ERROR;
         return -RT_ERROR;
 
 
-    if(lssdp_service_unregister(h) == 0)
+    if(lssdp_service_unregister(h) != 0)
     {
     {
-        return RT_EOK;
-    } else {
         LOG_E("lssdp_service_del service %s failed!", h->name);
         LOG_E("lssdp_service_del service %s failed!", h->name);
         return -RT_ERROR;
         return -RT_ERROR;
     }
     }