From: Paul Pluzhnikov Date: Thu, 9 Jun 2016 04:36:37 +0000 (-0700) Subject: 2016-06-09 Paul Pluzhnikov X-Git-Tag: upstream/2.24~135 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=530bb2bf3b2972a960cbf4ed7ddd0cf4561b5f83;p=platform%2Fupstream%2Fglibc.git 2016-06-09 Paul Pluzhnikov * test-skeleton.c (oom_error, xmalloc, xcalloc, xrealloc): New functions. (add_temp_file): Use them. --- diff --git a/ChangeLog b/ChangeLog index c07772e..58b05e8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2016-06-09 Paul Pluzhnikov + + * test-skeleton.c (oom_error, xmalloc, xcalloc, xrealloc): + New functions. + (add_temp_file): Use them. + 2016-06-09 Samuel Thibault name = newname; if (temp_name_list == NULL) @@ -124,13 +169,8 @@ create_temp_file (const char *base, char **filename) char *fname; int fd; - fname = (char *) malloc (strlen (test_dir) + 1 + strlen (base) - + sizeof ("XXXXXX")); - if (fname == NULL) - { - puts ("out of memory"); - return -1; - } + fname = (char *) xmalloc (strlen (test_dir) + 1 + strlen (base) + + sizeof ("XXXXXX")); strcpy (stpcpy (stpcpy (stpcpy (fname, test_dir), "/"), base), "XXXXXX"); fd = mkstemp (fname);