summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2013-03-05 15:46:37 +0100
committerMichal Schmidt <mschmidt@redhat.com>2013-03-13 14:14:00 +0100
commit5052495bbaf318d132024e75295da2f5d721420c (patch)
tree619f81c16351977e8ba4beed78f61b152455e85f /src
parent99d680acf192a7193c3de73b525ffbc24c25cca8 (diff)
manager: use more stpcpy()
Diffstat (limited to 'src')
-rw-r--r--src/core/manager.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/core/manager.c b/src/core/manager.c
index 77eaa468d9..a3eeb4afc1 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -230,32 +230,26 @@ static void draw_cylon(char buffer[], size_t buflen, unsigned width, unsigned po
memset(p, ' ', pos-2);
p += pos-2;
}
- memcpy(p, ANSI_RED_ON, strlen(ANSI_RED_ON));
- p += strlen(ANSI_RED_ON);
+ p = stpcpy(p, ANSI_RED_ON);
*p++ = '*';
}
if (pos > 0 && pos <= width) {
- memcpy(p, ANSI_HIGHLIGHT_RED_ON, strlen(ANSI_HIGHLIGHT_RED_ON));
- p += strlen(ANSI_HIGHLIGHT_RED_ON);
+ p = stpcpy(p, ANSI_HIGHLIGHT_RED_ON);
*p++ = '*';
}
- memcpy(p, ANSI_HIGHLIGHT_OFF, strlen(ANSI_HIGHLIGHT_OFF));
- p += strlen(ANSI_HIGHLIGHT_OFF);
+ p = stpcpy(p, ANSI_HIGHLIGHT_OFF);
if (pos < width) {
- memcpy(p, ANSI_RED_ON, strlen(ANSI_RED_ON));
- p += strlen(ANSI_RED_ON);
+ p = stpcpy(p, ANSI_RED_ON);
*p++ = '*';
if (pos < width-1) {
memset(p, ' ', width-1-pos);
p += width-1-pos;
}
- memcpy(p, ANSI_HIGHLIGHT_OFF, strlen(ANSI_HIGHLIGHT_OFF));
- p += strlen(ANSI_HIGHLIGHT_OFF);
+ p = stpcpy(p, ANSI_HIGHLIGHT_OFF);
}
- *p = 0;
}
static void manager_print_jobs_in_progress(Manager *m) {