diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2008-11-19 15:43:12 +0200 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2008-11-19 15:43:12 +0200 |
commit | 7275aef0fd47fde3cc7a2b976bc990c1791a10fa (patch) | |
tree | c6f7cd0d46971859ed76d59d43361adca660b094 | |
parent | d7f6a828761b82721415ea2a21defc989ef9fe70 (diff) | |
download | obexd-7275aef0fd47fde3cc7a2b976bc990c1791a10fa.tar.gz |
Use g_malloc and g_new where appropriate
-rw-r--r-- | src/bluetooth.c | 2 | ||||
-rw-r--r-- | src/main.c | 2 | ||||
-rw-r--r-- | src/obex.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/bluetooth.c b/src/bluetooth.c index d6f7d82..0b0037b 100644 --- a/src/bluetooth.c +++ b/src/bluetooth.c @@ -177,7 +177,7 @@ static gint server_register(guint16 service, const gchar *name, guint8 channel, uint32_t handle; int err; - server = g_malloc0(sizeof(struct server)); + server = g_new0(struct server, 1); server->services = service; server->name = g_strdup(name); server->folder = g_strdup(folder); @@ -88,7 +88,7 @@ int tty_init(int services, const gchar *root_path, cfmakeraw(&options); tcsetattr(fd, TCSANOW, &options); - server = g_malloc0(sizeof(struct server)); + server = g_new0(struct server, 1); server->services = services; server->folder = g_strdup(root_path); server->auto_accept = TRUE; @@ -438,7 +438,7 @@ gboolean os_prepare_get(struct obex_session *os, gchar *file, guint32 *size) os->offset = 0; if (stats.st_size > 0) - os->buf = g_new0(guint8, os->tx_mtu); + os->buf = g_malloc0(os->tx_mtu); *size = stats.st_size; |