summaryrefslogtreecommitdiffstats
path: root/lib/librte_cmdline/cmdline.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/librte_cmdline/cmdline.c')
-rw-r--r--lib/librte_cmdline/cmdline.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/lib/librte_cmdline/cmdline.c b/lib/librte_cmdline/cmdline.c
index 591b78b0..d9042f04 100644
--- a/lib/librte_cmdline/cmdline.c
+++ b/lib/librte_cmdline/cmdline.c
@@ -126,35 +126,11 @@ cmdline_printf(const struct cmdline *cl, const char *fmt, ...)
if (!cl || !fmt)
return;
-#ifdef _GNU_SOURCE
if (cl->s_out < 0)
return;
va_start(ap, fmt);
vdprintf(cl->s_out, fmt, ap);
va_end(ap);
-#else
- int ret;
- char *buf;
-
- if (cl->s_out < 0)
- return;
-
- buf = malloc(BUFSIZ);
- if (buf == NULL)
- return;
- va_start(ap, fmt);
- ret = vsnprintf(buf, BUFSIZ, fmt, ap);
- va_end(ap);
- if (ret < 0) {
- free(buf);
- return;
- }
- if (ret >= BUFSIZ)
- ret = BUFSIZ - 1;
- ret = write(cl->s_out, buf, ret);
- (void)ret;
- free(buf);
-#endif
}
int