gt: Add zalloc function
authorPawel Szewczyk <p.szewczyk@samsung.com>
Tue, 26 Aug 2014 09:36:48 +0000 (11:36 +0200)
committerPawel Szewczyk <p.szewczyk@samsung.com>
Tue, 26 Aug 2014 09:37:13 +0000 (11:37 +0200)
Change-Id: Ifd4de1238edf4ab95a65a5006e6761e7618e8bee
Signed-off-by: Pawel Szewczyk <p.szewczyk@samsung.com>
source/base/include/common.h [new file with mode: 0644]

diff --git a/source/base/include/common.h b/source/base/include/common.h
new file mode 100644 (file)
index 0000000..6a3f01c
--- /dev/null
@@ -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 <stdlib.h>
+
+static inline void *zalloc(size_t size)
+{
+       return calloc(1, size);
+}
+
+#endif //__GADGET_TOOL_COMMON_H__