]> granicus.if.org Git - transmission/commitdiff
(trunk) remove unnecessary #includes
authorCharles Kerr <charles@transmissionbt.com>
Thu, 28 Jan 2010 13:33:40 +0000 (13:33 +0000)
committerCharles Kerr <charles@transmissionbt.com>
Thu, 28 Jan 2010 13:33:40 +0000 (13:33 +0000)
12 files changed:
daemon/daemon.c
gtk/conf.c
gtk/torrent-cell-renderer.c
gtk/tr-core.h
gtk/tr-prefs.c
gtk/util.c
libtransmission/completion.h
libtransmission/fdlimit.c
libtransmission/peer-mgr.h
libtransmission/utils.h
libtransmission/web.c
libtransmission/webseed.c

index 25e9a5bfee9c4b066019fb3754036d0a6995d601..d06965c73cce0b1100f4135efb9c452dac6deeaf 100644 (file)
@@ -10,7 +10,6 @@
  * $Id$
  */
 
-#include <assert.h>
 #include <errno.h>
 #include <stdio.h> /* printf */
 #include <stdlib.h> /* exit, atoi */
index 76191de13ea01c78dad06778aac38da213a42c77..21e612bb7f5a22d9eca4225212977454aa26802d 100644 (file)
@@ -22,7 +22,6 @@
  * DEALINGS IN THE SOFTWARE.
  *****************************************************************************/
 
-#include <assert.h>
 #include <errno.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -108,7 +107,7 @@ lockfile( const char             * filename,
 static char*
 getLockFilename( void )
 {
-    assert( gl_confdir != NULL );
+    g_assert( gl_confdir != NULL );
     return g_build_filename( gl_confdir, "lock", NULL );
 }
 
@@ -211,7 +210,7 @@ tr_prefs_init_defaults( tr_benc * d )
 static char*
 getPrefsFilename( void )
 {
-    assert( gl_confdir != NULL );
+    g_assert( gl_confdir != NULL );
     return g_build_filename( gl_confdir, "settings.json", NULL );
 }
 
@@ -363,7 +362,7 @@ tr_file_set_contents( const char *   filename,
 static char*
 getCompat090PrefsFilename( void )
 {
-    assert( gl_confdir != NULL );
+    g_assert( gl_confdir != NULL );
 
     return g_build_filename( g_get_home_dir( ), ".transmission", "gtk", "prefs.ini", NULL );
 }
index 2e2b5c4659061b1004e7dd808df34836637acdaa..f2a285828a4682c293b64e845905075fcb8e610a 100644 (file)
@@ -10,7 +10,6 @@
  * $Id$
  */
 
-#include "assert.h"
 #include <string.h> /* strcmp() */
 #include <gtk/gtk.h>
 #include <glib/gi18n.h>
index 061c088d7533b63d056e702ebb2b34b565150120..59a18f5a352d5ee4c926e3b51598a7f153bdf484 100644 (file)
@@ -25,8 +25,6 @@
 #ifndef TR_CORE_H
 #define TR_CORE_H
 
-#include <string.h>
-
 #include <glib-object.h>
 #include <gtk/gtk.h>
 
index ba85af6c4cd4325351f03cfa660fefe4ebf8910f..4067cd21dd4a19db390bd27bf7f731ab00f0a42f 100644 (file)
@@ -11,8 +11,6 @@
  */
 
 #include <ctype.h> /* isspace */
-#include <errno.h>
-#include <stdarg.h>
 #include <limits.h> /* USHRT_MAX */
 #include <stdlib.h> /* free() */
 #include <unistd.h>
index d39e8dbb2395a2ff2b3047ba5b15460d179e35cc..22717c3f46f6728e4ecb4d69d0446ca3614996c9 100644 (file)
@@ -12,7 +12,6 @@
 
 #include <ctype.h> /* isxdigit() */
 #include <errno.h>
-#include <stdarg.h>
 #include <stdlib.h> /* free() */
 #include <string.h> /* strcmp() */
 
index 65ec0e428e83211266cf2f548019b1f6304aa0bf..a35292aa0b54b3c2fac32754d368bf72bba3e5af 100644 (file)
@@ -21,7 +21,6 @@
 
 #include "transmission.h"
 #include "bitfield.h"
-#include "utils.h" /* tr_bitfield */
 
 typedef struct tr_completion
 {
index 510a5f1b1b613302654a5380ab9ea6cd518dc686..05f2fcc422fc41188f9194a4338b0daeced45c9f 100644 (file)
@@ -61,7 +61,6 @@
 
 #include "transmission.h"
 #include "fdlimit.h"
-#include "list.h"
 #include "net.h"
 #include "platform.h" /* MAX_PATH_LENGTH, TR_PATH_DELIMITER */
 #include "session.h"
index e691f0d09d9d1fa187ad3a9571f9a0742281ecc4..b79f19a66ce28546213e92a34e290332e7d22b26 100644 (file)
@@ -28,7 +28,6 @@
 #include "net.h"
 #include "peer-common.h" /* struct peer_request */
 #include "publish.h" /* tr_publisher_tag */
-#include "utils.h"
 
 /**
  * @addtogroup peers Peers
index f6eb0d1bccf8c04a322d0adbb35e217e02a7790b..84435235bd9d5716cbce01d3191c6ef52f97e23f 100644 (file)
@@ -14,7 +14,6 @@
 #define TR_UTILS_H 1
 
 #include <inttypes.h>
-#include <stdarg.h>
 #include <stddef.h> /* size_t */
 #include <stdio.h> /* FILE* */
 #include <string.h> /* memcpy()* */
index f0b8eaef806cc8a719676b827d7309fba1c50986..1257caaf3001b5f522a5bf54b24fe1224c98afd6 100644 (file)
@@ -17,7 +17,6 @@
 #include <evdns.h>
 
 #include "transmission.h"
-#include "list.h"
 #include "net.h"
 #include "ptrarray.h"
 #include "session.h"
@@ -75,7 +74,7 @@ web_free( tr_web * g )
     evdns_shutdown( TRUE );
     curl_multi_cleanup( g->multi );
     evtimer_del( &g->timer_event );
-    tr_ptrArrayDestruct( &g->dns_cache, (TrListForeachFunc)dns_cache_item_free );
+    tr_ptrArrayDestruct( &g->dns_cache, (PtrArrayForeachFunc)dns_cache_item_free );
     memset( g, TR_MEMORY_TRASH, sizeof( struct tr_web ) );
     tr_free( g );
 }
@@ -135,6 +134,7 @@ dns_cache_item_free( struct dns_cache_item * item )
 {
     tr_free( item->host );
     tr_free( item->resolved_host );
+    memset( item, TR_MEMORY_TRASH, sizeof( struct dns_cache_item ) );
     tr_free( item );
 }
 
index ae67735cb5abdac7f02ab6149d1f215b9caf552b..3e977bb33bacd7346ee18a36209752f40778d0d2 100644 (file)
@@ -16,7 +16,6 @@
 
 #include "transmission.h"
 #include "inout.h"
-#include "list.h"
 #include "ratecontrol.h"
 #include "torrent.h"
 #include "utils.h"