MCPcopy Create free account
hub / github.com/eggert/tz / xmalloc

Function xmalloc

zdump.c:144–153  ·  view source on GitHub ↗

Return a pointer to a newly allocated buffer of size SIZE, exiting on failure. SIZE should be positive. */

Source from the content-addressed store, hash-verified

142/* Return a pointer to a newly allocated buffer of size SIZE, exiting
143 on failure. SIZE should be positive. */
144static void *
145xmalloc(ptrdiff_t size)
146{
147 void *p = malloc(size);
148 if (!p) {
149 fprintf(stderr, _("%s: Memory exhausted\n"), progname);
150 exit(EXIT_FAILURE);
151 }
152 return p;
153}
154
155#if ! HAVE_TZSET
156# undef tzset

Callers 4

tzallocFunction · 0.70
saveabbrFunction · 0.70
istrftimeFunction · 0.70
showtransFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected