OSDN Git Service

Reviewed and approved by Kevin Buettner <kevinb@redhat.com>
authorfnf <fnf>
Tue, 10 Sep 2002 02:13:15 +0000 (02:13 +0000)
committerfnf <fnf>
Tue, 10 Sep 2002 02:13:15 +0000 (02:13 +0000)
2002-09-09  Fred Fish  <fnf@intrinsity.com>
* simple.c:  Pass addresses to strncpy, not chars.

gdb/testsuite/gdb.gdbtk/ChangeLog
gdb/testsuite/gdb.gdbtk/simple.c

index d161686..53bcf35 100644 (file)
@@ -1,3 +1,7 @@
+2002-09-09  Fred Fish  <fnf@intrinsity.com>
+
+       * simple.c:  Pass addresses to strncpy, not chars.
+
 2002-04-26  Martin M. Hunt  <hunt@redhat.com>
 
        * defs (gdbtk_test_done): Call gdbtk_force_quit. 
index b35cd58..969f688 100644 (file)
@@ -12,7 +12,7 @@ main(int argc, char * argv[])
      {
        int j = i % 3;
        int k = 3 - j;
-       strncpy (a[i], b[k], j);
+       strncpy (&a[i], &b[k], j);
        foo = (long) j * k / i + 2 * k * k * k;
      }
    return 0;