Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/tic Use memmove as we are effectively moving memory ...



details:   https://anonhg.NetBSD.org/src/rev/5c6f6842941c
branches:  trunk
changeset: 770942:5c6f6842941c
user:      roy <roy%NetBSD.org@localhost>
date:      Thu Nov 03 10:12:57 2011 +0000

description:
Use memmove as we are effectively moving memory from left to right so
that the use=foo capability is removed when merging foo.

diffstat:

 usr.bin/tic/tic.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 9d005a782825 -r 5c6f6842941c usr.bin/tic/tic.c
--- a/usr.bin/tic/tic.c Thu Nov 03 07:42:56 2011 +0000
+++ b/usr.bin/tic/tic.c Thu Nov 03 10:12:57 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tic.c,v 1.10 2010/02/22 23:05:39 roy Exp $ */
+/* $NetBSD: tic.c,v 1.11 2011/11/03 10:12:57 roy Exp $ */
 
 /*
  * Copyright (c) 2009, 2010 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: tic.c,v 1.10 2010/02/22 23:05:39 roy Exp $");
+__RCSID("$NetBSD: tic.c,v 1.11 2011/11/03 10:12:57 roy Exp $");
 
 #include <sys/types.h>
 
@@ -357,7 +357,7 @@
                                cap += sizeof(uint16_t) + num;
                                memn = rtic->extras.bufpos -
                                    (cap - rtic->extras.buf);
-                               memcpy(scap, cap, memn);
+                               memmove(scap, cap, memn);
                                rtic->extras.bufpos -= cap - scap;
                                cap = scap;
                                rtic->extras.entries--;



Home | Main Index | Thread Index | Old Index