[rtems commit] monitor: Replace puts() with proper fprintf()
Sebastian Huber
sebh at rtems.org
Wed Dec 3 12:16:17 UTC 2014
Module: rtems
Branch: master
Commit: 89052019858bc64be66f226294d67f5434b02703
Changeset: http://git.rtems.org/rtems/commit/?id=89052019858bc64be66f226294d67f5434b02703
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Wed Dec 3 13:00:59 2014 +0100
monitor: Replace puts() with proper fprintf()
---
cpukit/libmisc/monitor/mon-editor.c | 4 ++--
cpukit/libmisc/monitor/mon-prmisc.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/cpukit/libmisc/monitor/mon-editor.c b/cpukit/libmisc/monitor/mon-editor.c
index e7a3ae4..db11737 100644
--- a/cpukit/libmisc/monitor/mon-editor.c
+++ b/cpukit/libmisc/monitor/mon-editor.c
@@ -265,7 +265,7 @@ rtems_monitor_line_editor (
switch (c)
{
case KEYS_END:
- puts(buffer + pos);
+ fprintf(stdout, "%s", buffer + pos);
pos = (int) strlen (buffer);
break;
@@ -428,7 +428,7 @@ rtems_monitor_line_editor (
int ch, bs;
for (ch = end; ch > pos; ch--)
buffer[ch] = buffer[ch - 1];
- puts(buffer + pos);
+ fprintf(stdout, "%s", buffer + pos);
for (bs = 0; bs < (end - pos + 1); bs++)
putchar ('\b');
}
diff --git a/cpukit/libmisc/monitor/mon-prmisc.c b/cpukit/libmisc/monitor/mon-prmisc.c
index 8607974..e519447 100644
--- a/cpukit/libmisc/monitor/mon-prmisc.c
+++ b/cpukit/libmisc/monitor/mon-prmisc.c
@@ -103,7 +103,7 @@ rtems_monitor_dump_name(rtems_id id)
rtems_object_get_name( id, sizeof(name_buffer), name_buffer );
- return puts( name_buffer );
+ return fprintf(stdout, "%s", name_buffer);
}
int
More information about the vc
mailing list