/* Test of POSIX compatible vsnprintf() and snprintf() functions.
- Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-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
ASSERT (memcmp (buf, "12345", size - 1) == 0);
ASSERT (buf[size - 1] == '\0');
}
- ASSERT (memcmp (buf + size, "DEADBEEF" + size, 8 - size) == 0);
+ ASSERT (memcmp (buf + size, &"DEADBEEF"[size], 8 - size) == 0);
}
else
{
}
{ /* Rounding can turn a ...FFF into a ...000.
- This shows a MacOS X 10.3.9 (Darwin 7.9) bug. */
+ This shows a Mac OS X 10.3.9 (Darwin 7.9) bug. */
char result[100];
int retval =
my_snprintf (result, sizeof (result), "%.1a %d", 1.999, 33, 44, 55);
}
{ /* Rounding can turn a ...FFF into a ...000.
- This shows a MacOS X 10.3.9 (Darwin 7.9) bug and a
+ This shows a Mac OS X 10.3.9 (Darwin 7.9) bug and a
glibc 2.4 bug <http://sourceware.org/bugzilla/show_bug.cgi?id=2908>. */
char result[100];
int retval =