fix CID 1596595: Resource leaks, and CID 1596594: (CHECKED_RETURN)
[claws.git] / src / plugins / address_keeper / address_keeper.c
index d85d949cc4cb28387e79b4a30817b5d31f91958c..38dc6d2ae85a3262b5186b2801b1f78ffb1eaf9e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
+ * Claws Mail -- a GTK based, lightweight, and fast e-mail client
  * Copyright (C) 2009-2015 Ricardo Mones and the Claws Mail Team
  *
  * This program is free software; you can redistribute it and/or modify
@@ -33,7 +33,7 @@
 #include "prefs_common.h"
 
 /** Identifier for the hook. */
-static guint hook_id;
+static gulong hook_id = HOOK_NONE;
 
 /**
  * Extracts name from an address.
@@ -248,7 +248,7 @@ gint plugin_init(gchar **error)
        hook_id = hooks_register_hook(COMPOSE_CHECK_BEFORE_SEND_HOOKLIST, 
                                      addrk_before_send_hook, NULL);
        
-       if (hook_id == -1) {
+       if (hook_id == HOOK_NONE) {
                *error = g_strdup(_("Failed to register check before send hook"));
                return -1;
        }
@@ -295,11 +295,11 @@ const gchar *plugin_desc(void)
 /**
  * Get the kind of plugin.
  *
- * @return The "GTK2" constant.
+ * @return The "GTK3" constant.
  */
 const gchar *plugin_type(void)
 {
-       return "GTK2";
+       return "GTK3";
 }
 
 /**