summaryrefslogtreecommitdiff
path: root/liblazy/liblazy.c
blob: 3aa91faafe4f9df3bc7b7ee3ef0b1e750ff1969d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/***************************************************************************
 *                                                                         *
 *                              liblazy                                    *
 *                                                                         *
 *           Copyright (C) 2006 Holger Macht <holger@homac.de>             *
 *                                                                         *
 *              Author(s): Holger Macht <holger@homac.de>                  *
 *                                                                         *
 * This library is free software; you can redistribute it and/or modify it *
 * under the terms of the GNU Lesser General Public License as published   *
 * by the Free Software Foundation; either version 2.1 of the License, or  *
 * (at your option) any later version.                                     *
 *                                                                         *
 * This library is distributed in the hope that it will be useful, but     *
 * WITHOUT ANY WARRANTY; without even the implied warranty of              *
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU       *
 * Lesser General Public License for more details.                         *
 *                                                                         *
 * You should have received a copy of the GNU Lesser General Public        *
 * License along with this library; if not, write to the Free Software     *
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA           *
 * 02110-1301  USA                                                         *
 *                                                                         *
 ***************************************************************************/

#include "liblazy.h"

#include <stdlib.h>

void liblazy_free_string(char *string)
{
	if (string == NULL)
		return;
	free(string);
	string = NULL;
}

void liblazy_free_strlist(char **strlist)
{
	int i = 0;
	if (strlist == NULL)
		return;
	for (i = 0; strlist[i] != NULL; i++) {
		free(strlist[i]);
		strlist[i] = NULL;
	}
	free(strlist);
	strlist = NULL;
}

/** @mainpage liblazy
 *
 * \section sec_intro Introduction
 *
 * D-Bus methods provided for convenience
 * Liblazy is a simple and easy to use library that provides convenient
 * functions for sending messages over the D-Bus daemon, querying
 * information from HAL or asking PolicyKit for a privilege.
 */