/src/lvm2/base/memory/zalloc.h
Line  | Count  | Source (jump to first uncovered line)  | 
1  |  | // Copyright (C) 2018 Red Hat, Inc. All rights reserved.  | 
2  |  | //   | 
3  |  | // This file is part of LVM2.  | 
4  |  | //  | 
5  |  | // This copyrighted material is made available to anyone wishing to use,  | 
6  |  | // modify, copy, or redistribute it subject to the terms and conditions  | 
7  |  | // of the GNU Lesser General Public License v.2.1.  | 
8  |  | //  | 
9  |  | // You should have received a copy of the GNU Lesser General Public License  | 
10  |  | // along with this program; if not, write to the Free Software Foundation,  | 
11  |  | // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA  | 
12  |  |  | 
13  |  | #ifndef BASE_MEMORY_ZALLOC_H  | 
14  |  | #define BASE_MEMORY_ZALLOC_H  | 
15  |  |  | 
16  |  | #include <stdlib.h>  | 
17  |  |  | 
18  |  | //----------------------------------------------------------------  | 
19  |  |  | 
20  |  | static inline void *zalloc(size_t len)  | 
21  | 0  | { | 
22  | 0  |   return calloc(1, len);  | 
23  | 0  | }  | 
24  |  |  | 
25  |  | //----------------------------------------------------------------  | 
26  |  |  | 
27  |  | #endif  |