From 2bec967b5b96aa9e081bffbd2654de8e34318440 Mon Sep 17 00:00:00 2001 From: Pawel Szewczyk Date: Tue, 26 Aug 2014 11:36:48 +0200 Subject: [PATCH] gt: Add zalloc function Change-Id: Ifd4de1238edf4ab95a65a5006e6761e7618e8bee Signed-off-by: Pawel Szewczyk --- source/base/include/common.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 source/base/include/common.h diff --git a/source/base/include/common.h b/source/base/include/common.h new file mode 100644 index 0000000..6a3f01c --- /dev/null +++ b/source/base/include/common.h @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __GADGET_TOOL_COMMON_H__ +#define __GADGET_TOOL_COMMON_H__ + +#include + +static inline void *zalloc(size_t size) +{ + return calloc(1, size); +} + +#endif //__GADGET_TOOL_COMMON_H__ -- 2.7.4