[glib/wip/win32monitor: 3/4] gwin32fsmonitorutils: no need to g_assert when using g_new
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/wip/win32monitor: 3/4] gwin32fsmonitorutils: no need to g_assert when using g_new
- Date: Tue, 1 Mar 2016 07:47:23 +0000 (UTC)
commit dedf65a5fd346da884a65dd4781504bc15533725
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Tue Mar 1 08:40:48 2016 +0100
gwin32fsmonitorutils: no need to g_assert when using g_new
gio/win32/gwin32fsmonitorutils.c | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/gio/win32/gwin32fsmonitorutils.c b/gio/win32/gwin32fsmonitorutils.c
index 43955e7..982acb0 100644
--- a/gio/win32/gwin32fsmonitorutils.c
+++ b/gio/win32/gwin32fsmonitorutils.c
@@ -368,19 +368,19 @@ g_win32_fs_monitor_init (GWin32FSMonitorPrivate *monitor,
}
}
-GWin32FSMonitorPrivate* g_win32_fs_monitor_create (gboolean isfile)
+GWin32FSMonitorPrivate *
+g_win32_fs_monitor_create (gboolean isfile)
{
- GWin32FSMonitorPrivate* monitor = (GWin32FSMonitorPrivate*) g_new0 (GWin32FSMonitorPrivate, 1);
- g_assert (monitor != 0);
+ GWin32FSMonitorPrivate *monitor = (GWin32FSMonitorPrivate *)g_new0 (GWin32FSMonitorPrivate, 1);
monitor->buffer_allocated_bytes = 32784;
monitor->file_notify_buffer = g_new0 (FILE_NOTIFY_INFORMATION, monitor->buffer_allocated_bytes);
- g_assert (monitor->file_notify_buffer);
return monitor;
}
-void g_win32_fs_monitor_finalize (GWin32FSMonitorPrivate *monitor)
+void
+g_win32_fs_monitor_finalize (GWin32FSMonitorPrivate *monitor)
{
if (monitor->hDirectory == INVALID_HANDLE_VALUE)
{
@@ -410,7 +410,8 @@ void g_win32_fs_monitor_finalize (GWin32FSMonitorPrivate *monitor)
g_free (monitor->wfilename_short);
}
-void g_win32_fs_monitor_close_handle (GWin32FSMonitorPrivate *monitor)
+void
+g_win32_fs_monitor_close_handle (GWin32FSMonitorPrivate *monitor)
{
/* This triggers a last callback() with nBytes==0. */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]