From a334b422c32bf1bf4c94bbe41a8f3d20aa8e5a80 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Thu, 28 Jan 2010 13:33:40 +0000 Subject: [PATCH] (trunk) remove unnecessary #includes --- daemon/daemon.c | 1 - gtk/conf.c | 7 +++---- gtk/torrent-cell-renderer.c | 1 - gtk/tr-core.h | 2 -- gtk/tr-prefs.c | 2 -- gtk/util.c | 1 - libtransmission/completion.h | 1 - libtransmission/fdlimit.c | 1 - libtransmission/peer-mgr.h | 1 - libtransmission/utils.h | 1 - libtransmission/web.c | 4 ++-- libtransmission/webseed.c | 1 - 12 files changed, 5 insertions(+), 18 deletions(-) diff --git a/daemon/daemon.c b/daemon/daemon.c index 25e9a5bfe..d06965c73 100644 --- a/daemon/daemon.c +++ b/daemon/daemon.c @@ -10,7 +10,6 @@ * $Id$ */ -#include #include #include /* printf */ #include /* exit, atoi */ diff --git a/gtk/conf.c b/gtk/conf.c index 76191de13..21e612bb7 100644 --- a/gtk/conf.c +++ b/gtk/conf.c @@ -22,7 +22,6 @@ * DEALINGS IN THE SOFTWARE. *****************************************************************************/ -#include #include #include #include @@ -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 ); } diff --git a/gtk/torrent-cell-renderer.c b/gtk/torrent-cell-renderer.c index 2e2b5c465..f2a285828 100644 --- a/gtk/torrent-cell-renderer.c +++ b/gtk/torrent-cell-renderer.c @@ -10,7 +10,6 @@ * $Id$ */ -#include "assert.h" #include /* strcmp() */ #include #include diff --git a/gtk/tr-core.h b/gtk/tr-core.h index 061c088d7..59a18f5a3 100644 --- a/gtk/tr-core.h +++ b/gtk/tr-core.h @@ -25,8 +25,6 @@ #ifndef TR_CORE_H #define TR_CORE_H -#include - #include #include diff --git a/gtk/tr-prefs.c b/gtk/tr-prefs.c index ba85af6c4..4067cd21d 100644 --- a/gtk/tr-prefs.c +++ b/gtk/tr-prefs.c @@ -11,8 +11,6 @@ */ #include /* isspace */ -#include -#include #include /* USHRT_MAX */ #include /* free() */ #include diff --git a/gtk/util.c b/gtk/util.c index d39e8dbb2..22717c3f4 100644 --- a/gtk/util.c +++ b/gtk/util.c @@ -12,7 +12,6 @@ #include /* isxdigit() */ #include -#include #include /* free() */ #include /* strcmp() */ diff --git a/libtransmission/completion.h b/libtransmission/completion.h index 65ec0e428..a35292aa0 100644 --- a/libtransmission/completion.h +++ b/libtransmission/completion.h @@ -21,7 +21,6 @@ #include "transmission.h" #include "bitfield.h" -#include "utils.h" /* tr_bitfield */ typedef struct tr_completion { diff --git a/libtransmission/fdlimit.c b/libtransmission/fdlimit.c index 510a5f1b1..05f2fcc42 100644 --- a/libtransmission/fdlimit.c +++ b/libtransmission/fdlimit.c @@ -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" diff --git a/libtransmission/peer-mgr.h b/libtransmission/peer-mgr.h index e691f0d09..b79f19a66 100644 --- a/libtransmission/peer-mgr.h +++ b/libtransmission/peer-mgr.h @@ -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 diff --git a/libtransmission/utils.h b/libtransmission/utils.h index f6eb0d1bc..84435235b 100644 --- a/libtransmission/utils.h +++ b/libtransmission/utils.h @@ -14,7 +14,6 @@ #define TR_UTILS_H 1 #include -#include #include /* size_t */ #include /* FILE* */ #include /* memcpy()* */ diff --git a/libtransmission/web.c b/libtransmission/web.c index f0b8eaef8..1257caaf3 100644 --- a/libtransmission/web.c +++ b/libtransmission/web.c @@ -17,7 +17,6 @@ #include #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 ); } diff --git a/libtransmission/webseed.c b/libtransmission/webseed.c index ae67735cb..3e977bb33 100644 --- a/libtransmission/webseed.c +++ b/libtransmission/webseed.c @@ -16,7 +16,6 @@ #include "transmission.h" #include "inout.h" -#include "list.h" #include "ratecontrol.h" #include "torrent.h" #include "utils.h" -- 2.40.0