summaryrefslogtreecommitdiff
path: root/tests/lib/test_heavy_thread.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/test_heavy_thread.c')
-rw-r--r--tests/lib/test_heavy_thread.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/tests/lib/test_heavy_thread.c b/tests/lib/test_heavy_thread.c
index 075bcb6daf..b3c6e4c2f7 100644
--- a/tests/lib/test_heavy_thread.c
+++ b/tests/lib/test_heavy_thread.c
@@ -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;