Simple Terminal from SuckLess
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
328 B

  1. /* See LICENSE file for copyright and license details. */
  2. #include "util.h"
  3. #include <errno.h>
  4. #include <stdarg.h>
  5. #include <stdio.h>
  6. #include <stdlib.h>
  7. #include <string.h>
  8. void *
  9. emallocz(unsigned int size) {
  10. void *res = calloc(1, size);
  11. if(!res)
  12. err(EXIT_FAILURE, "could not malloc() %u bytes\n", size);
  13. return res;
  14. }