Cleanup remaining unused variables and copystr()

This commit is contained in:
Quentin Rameau 2015-11-20 17:42:25 +01:00
parent adc650f399
commit 7e9a85a5cb
1 changed files with 0 additions and 18 deletions

18
surf.c
View File

@ -109,7 +109,6 @@ static gboolean showxid = FALSE;
static char winid[64]; static char winid[64];
static char togglestats[10]; static char togglestats[10];
static char pagestats[2]; static char pagestats[2];
static GTlsDatabase *tlsdb;
static int cookiepolicy; static int cookiepolicy;
static char *stylefile = NULL; static char *stylefile = NULL;
static const char *useragent; static const char *useragent;
@ -124,7 +123,6 @@ static void clipboard(Client *c, const Arg *a);
static WebKitCookieAcceptPolicy cookiepolicy_get(void); static WebKitCookieAcceptPolicy cookiepolicy_get(void);
static char cookiepolicy_set(const WebKitCookieAcceptPolicy p); static char cookiepolicy_set(const WebKitCookieAcceptPolicy p);
static char *copystr(char **str, const char *src);
static GtkWidget *createview(WebKitWebView *v, WebKitNavigationAction *a, static GtkWidget *createview(WebKitWebView *v, WebKitNavigationAction *a,
Client *c); Client *c);
static gboolean decidepolicy(WebKitWebView *v, WebKitPolicyDecision *d, static gboolean decidepolicy(WebKitWebView *v, WebKitPolicyDecision *d,
@ -379,19 +377,6 @@ clipboard(Client *c, const Arg *a)
} }
} }
char *
copystr(char **str, const char *src)
{
char *tmp;
tmp = g_strdup(src);
if (str && *str) {
g_free(*str);
*str = tmp;
}
return tmp;
}
GtkWidget * GtkWidget *
createview(WebKitWebView *v, WebKitNavigationAction *a, Client *c) createview(WebKitWebView *v, WebKitNavigationAction *a, Client *c)
{ {
@ -876,7 +861,6 @@ Client *
newclient(Client *rc) newclient(Client *rc)
{ {
Client *c; Client *c;
gdouble dpi;
if (!(c = calloc(1, sizeof(Client)))) if (!(c = calloc(1, sizeof(Client))))
die("Cannot malloc!\n"); die("Cannot malloc!\n");
@ -1235,8 +1219,6 @@ void
setup(void) setup(void)
{ {
int i; int i;
WebKitWebContext *context;
GError *error = NULL;
/* clean up any zombies immediately */ /* clean up any zombies immediately */
sigchld(0); sigchld(0);