RPM Package Manager, CVS Repository http://rpm5.org/cvs/ ____________________________________________________________________________
Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: j...@rpm5.org Module: syck Date: 11-Apr-2016 00:37:35 Branch: rpm-5_4 Handle: 2016041022373203 Modified files: (Branch: rpm-5_4) syck/lib node.c syck/tests Basic.c Emit.c Parse.c YTS.c Log: - syc: add private vmefail routines to use xmalloc() macros. Summary: Revision Changes Path 1.2.8.2 +0 -10 syck/lib/node.c 1.2.8.1 +10 -0 syck/tests/Basic.c 1.2.8.1 +10 -0 syck/tests/Emit.c 1.3.8.2 +10 -0 syck/tests/Parse.c 1.3.8.2 +10 -0 syck/tests/YTS.c ____________________________________________________________________________ patch -p0 <<'@@ .' Index: syck/lib/node.c ============================================================================ $ cvs diff -u -r1.2.8.1 -r1.2.8.2 node.c --- syck/lib/node.c 13 Mar 2016 09:03:24 -0000 1.2.8.1 +++ syck/lib/node.c 10 Apr 2016 22:37:32 -0000 1.2.8.2 @@ -11,16 +11,6 @@ #include "syck.h" #include "debug.h" -void *vmefail(size_t size) -{ - fprintf(stderr, _("memory alloc (%u bytes) returned NULL.\n"), (unsigned)size); - exit(EXIT_FAILURE); - /*@notreached@*/ -#if !(__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)) - return NULL; -#endif -} - /* * Node allocation functions */ @@ . patch -p0 <<'@@ .' Index: syck/tests/Basic.c ============================================================================ $ cvs diff -u -r1.2 -r1.2.8.1 Basic.c --- syck/tests/Basic.c 17 Oct 2008 20:45:33 -0000 1.2 +++ syck/tests/Basic.c 10 Apr 2016 22:37:33 -0000 1.2.8.1 @@ -12,6 +12,16 @@ #include "CuTest.h" #include "debug.h" +void *vmefail(size_t size) +{ + fprintf(stderr, _("memory alloc (%u bytes) returned NULL.\n"), (unsigned)size); + exit(EXIT_FAILURE); + /*@notreached@*/ +#if !(__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)) + return NULL; +#endif +} + // // Test allocating a single node of kind 'str'. // @@ . patch -p0 <<'@@ .' Index: syck/tests/Emit.c ============================================================================ $ cvs diff -u -r1.2 -r1.2.8.1 Emit.c --- syck/tests/Emit.c 17 Oct 2008 20:45:33 -0000 1.2 +++ syck/tests/Emit.c 10 Apr 2016 22:37:34 -0000 1.2.8.1 @@ -12,6 +12,16 @@ #include "CuTest.h" #include "debug.h" +void *vmefail(size_t size) +{ + fprintf(stderr, _("memory alloc (%u bytes) returned NULL.\n"), (unsigned)size); + exit(EXIT_FAILURE); + /*@notreached@*/ +#if !(__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)) + return NULL; +#endif +} + // // 1. Test the buffering -- print 10 bytes at a time // @@ . patch -p0 <<'@@ .' Index: syck/tests/Parse.c ============================================================================ $ cvs diff -u -r1.3.8.1 -r1.3.8.2 Parse.c --- syck/tests/Parse.c 16 Feb 2015 21:23:18 -0000 1.3.8.1 +++ syck/tests/Parse.c 10 Apr 2016 22:37:35 -0000 1.3.8.2 @@ -12,6 +12,16 @@ #include "CuTest.h" #include "debug.h" +void *vmefail(size_t size) +{ + fprintf(stderr, _("memory alloc (%u bytes) returned NULL.\n"), (unsigned)size); + exit(EXIT_FAILURE); + /*@notreached@*/ +#if !(__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)) + return NULL; +#endif +} + // // 1. Test the buffering -- read 4 bytes at a time // @@ . patch -p0 <<'@@ .' Index: syck/tests/YTS.c ============================================================================ $ cvs diff -u -r1.3.8.1 -r1.3.8.2 YTS.c --- syck/tests/YTS.c 16 Feb 2015 21:23:18 -0000 1.3.8.1 +++ syck/tests/YTS.c 10 Apr 2016 22:37:35 -0000 1.3.8.2 @@ -32,6 +32,16 @@ }; struct test_node end_node = { T_END }; +void *vmefail(size_t size) +{ + fprintf(stderr, _("memory alloc (%u bytes) returned NULL.\n"), (unsigned)size); + exit(EXIT_FAILURE); + /*@notreached@*/ +#if !(__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)) + return NULL; +#endif +} + /* * Assertion which compares a YAML document with an * equivalent set of test_node structs. @@ . ______________________________________________________________________ RPM Package Manager http://rpm5.org CVS Sources Repository rpm-cvs@rpm5.org