]> git.proxmox.com Git - mirror_frr.git/blobdiff - tests/lib/test_heavy_thread.c
Merge pull request #8976 from ton31337/fix/bgp_dest_unlock_node
[mirror_frr.git] / tests / lib / test_heavy_thread.c
index 075bcb6daf7b5c6c2abca54f4a2738a3684a4dad..d516ed0de075ba7f37c8a3bb8b494887afe6d07d 100644 (file)
@@ -110,16 +110,9 @@ DEFUN (clear_foo,
 
        str = argv_concat(argv, argc, 0);
 
-       if ((ws = XMALLOC(MTYPE_TMP, sizeof(*ws))) == NULL) {
-               zlog_err("%s: unable to allocate work_state", __func__);
-               return CMD_WARNING;
-       }
+       ws = XMALLOC(MTYPE_TMP, sizeof(*ws));
 
-       if (!(ws->str = XSTRDUP(MTYPE_TMP, str))) {
-               zlog_err("%s: unable to xstrdup", __func__);
-               XFREE(MTYPE_TMP, ws);
-               return CMD_WARNING;
-       }
+       ws->str = XSTRDUP(MTYPE_TMP, str);
 
        ws->vty = vty;
        ws->i = ITERS_FIRST;
@@ -129,7 +122,7 @@ DEFUN (clear_foo,
        return CMD_SUCCESS;
 }
 
-void test_init()
+void test_init(void)
 {
        install_element(VIEW_NODE, &clear_foo_cmd);
 }