2005-06-30 Colin Walters <walters@verbum.org>
[platform/upstream/dbus.git] / dbus / dbus-timeout.c
index 625fbb7..bea86eb 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (C) 2003  CodeFactory AB
  *
- * Licensed under the Academic Free License version 1.2
+ * Licensed under the Academic Free License version 2.1
  * 
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -33,6 +33,9 @@
  * @{
  */
 
+/**
+ * Internals of DBusTimeout
+ */
 struct DBusTimeout
 {
   int refcount;                                /**< Reference count */
@@ -64,6 +67,9 @@ _dbus_timeout_new (int                 interval,
   DBusTimeout *timeout;
 
   timeout = dbus_new0 (DBusTimeout, 1);
+  if (timeout == NULL)
+    return NULL;
+  
   timeout->refcount = 1;
   timeout->interval = interval;
 
@@ -80,11 +86,14 @@ _dbus_timeout_new (int                 interval,
  * Increments the reference count of a DBusTimeout object.
  *
  * @param timeout the timeout object.
+ * @returns the timeout object.
  */
-void
+DBusTimeout *
 _dbus_timeout_ref (DBusTimeout *timeout)
 {
   timeout->refcount += 1;
+
+  return timeout;
 }
 
 /**