From a720ef262774e51066f5885c76deebde83dec74e Mon Sep 17 00:00:00 2001 From: James Booth Date: Wed, 2 Apr 2014 21:01:20 +0100 Subject: Removed strcpy calls --- src/ui/statusbar.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/ui/statusbar.c') diff --git a/src/ui/statusbar.c b/src/ui/statusbar.c index eb39467b..bbb3b781 100644 --- a/src/ui/statusbar.c +++ b/src/ui/statusbar.c @@ -277,8 +277,7 @@ _status_bar_print_message(const char * const msg) if (message != NULL) { free(message); } - message = (char *) malloc(strlen(msg) + 1); - strcpy(message, msg); + message = strdup(msg); mvwprintw(status_bar, 0, 10, message); int cols = getmaxx(stdscr); -- cgit 1.4.1-2-gfad0 '/> Soul of a tiny new machine. More thorough tests → More comprehensible and rewrite-friendly software → More resilient society.Kartik K. Agaram <vc@akkartik.com>
about summary refs log blame commit diff stats
path: root/archive/1.vm/continuation3.mu
blob: cde6095898491b6e5d5220c88b1c99f0493d8815 (plain) (tree)
1
2
3
4
5
6
7
8