mem.c (1de7b4b805ddbf2429da511c053686ac4591ed89) mem.c (a312f3e74286c9bccd498198bfd236c49916d891)
1/*-
2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
3 *
4 * Copyright (C) 2009 Gabor Kovesdan <gabor@FreeBSD.org>
5 * Copyright (C) 2012 Oleg Moskalenko <mom040267@gmail.com>
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 22 unchanged lines hidden (view full) ---

31__FBSDID("$FreeBSD$");
32
33#include <err.h>
34#include <stdlib.h>
35#include <string.h>
36
37#include "mem.h"
38
1/*-
2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
3 *
4 * Copyright (C) 2009 Gabor Kovesdan <gabor@FreeBSD.org>
5 * Copyright (C) 2012 Oleg Moskalenko <mom040267@gmail.com>
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 22 unchanged lines hidden (view full) ---

31__FBSDID("$FreeBSD$");
32
33#include <err.h>
34#include <stdlib.h>
35#include <string.h>
36
37#include "mem.h"
38
39void*
40sort_calloc(size_t nb, size_t size)
41{
42 void *ptr;
43
44 if ((ptr = calloc(nb, size)) == NULL)
45 err(2, NULL);
46 return (ptr);
47}
48
39/*
40 * malloc() wrapper.
41 */
42void *
43sort_malloc(size_t size)
44{
45 void *ptr;
46

--- 37 unchanged lines hidden ---
49/*
50 * malloc() wrapper.
51 */
52void *
53sort_malloc(size_t size)
54{
55 void *ptr;
56

--- 37 unchanged lines hidden ---