lexer: Move lex_ellipsize() into string module, as str_ellipsize().
[pspp] / tests / libpspp / tower-test.c
index f5c002652a4409af5f9ef834b2d3ca0dd2f3fe82..8eae829407fce39e3ab5a47b1d7ce631391eb37a 100644 (file)
@@ -1,5 +1,5 @@
 /* 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
@@ -140,7 +140,7 @@ factorial (unsigned int n)
   unsigned int value = 1;
   /* Disallow N values that overflow on 32-bit machines. */
   assert (n <= 12);
-  for (; n > 1; )
+  for (; n > 1;)
     value *= n--;
   return value;
 }
@@ -442,8 +442,8 @@ test_delete (void)
                       assert (j < block_cnt - i);
                       if (expected[j].x == idx)
                         {
-                          memcpy (&expected[j], &expected[j + 1],
-                                  sizeof *expected * (block_cnt - i - j - 1));
+                          memmove (&expected[j], &expected[j + 1],
+                                   sizeof *expected * (block_cnt - i - j - 1));
                           break;
                         }
                     }