projects
/
pspp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e9052f5
)
tower-test: Use memmove(), not memcpy(), for overlapping memory move.
author
Ben Pfaff
<blp@cs.stanford.edu>
Sat, 13 Jul 2013 15:01:46 +0000
(08:01 -0700)
committer
Ben Pfaff
<blp@cs.stanford.edu>
Sat, 13 Jul 2013 15:01:46 +0000
(08:01 -0700)
Found by valgrind.
tests/libpspp/tower-test.c
patch
|
blob
|
history
diff --git
a/tests/libpspp/tower-test.c
b/tests/libpspp/tower-test.c
index f5c002652a4409af5f9ef834b2d3ca0dd2f3fe82..78198cb554fb9974b69a2780723151959cee58bc 100644
(file)
--- a/
tests/libpspp/tower-test.c
+++ b/
tests/libpspp/tower-test.c
@@
-1,5
+1,5
@@
/* PSPP - a program for statistical analysis.
/* PSPP - a program for statistical analysis.
- Copyright (C) 2007, 2010 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2010
, 2013
Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@
-442,8
+442,8
@@
test_delete (void)
assert (j < block_cnt - i);
if (expected[j].x == idx)
{
assert (j < block_cnt - i);
if (expected[j].x == idx)
{
- mem
cpy
(&expected[j], &expected[j + 1],
- sizeof *expected * (block_cnt - i - j - 1));
+ mem
move
(&expected[j], &expected[j + 1],
+
sizeof *expected * (block_cnt - i - j - 1));
break;
}
}
break;
}
}