[hackers] [surf] There's no need to call geturi() again in loadchanged || Quentin Rameau

From: <git_AT_suckless.org>
Date: Fri, 12 May 2017 00:33:49 +0200 (CEST)

commit 5e2216c41434219e60ca52bc5f10d34fddbca964
Author: Quentin Rameau <quinq_AT_fifth.space>
AuthorDate: Fri May 12 00:03:57 2017 +0200
Commit: Quentin Rameau <quinq_AT_fifth.space>
CommitDate: Fri May 12 00:30:45 2017 +0200

    There's no need to call geturi() again in loadchanged
    
    Also call the variable “uri” instead of “title” which was ambiguous
    regarding what it is.

diff --git a/surf.c b/surf.c
index 2003b79..f02418a 100644
--- a/surf.c
+++ b/surf.c
_AT_@ -1375,23 +1375,23 @@ loadfailedtls(WebKitWebView *v, gchar *uri, GTlsCertificate *cert,
 void
 loadchanged(WebKitWebView *v, WebKitLoadEvent e, Client *c)
 {
- const char *title = geturi(c);
+ const char *uri = geturi(c);
 
         switch (e) {
         case WEBKIT_LOAD_STARTED:
- setatom(c, AtomUri, title);
- c->title = title;
+ setatom(c, AtomUri, uri);
+ c->title = uri;
                 c->https = c->insecure = 0;
- seturiparameters(c, geturi(c));
+ seturiparameters(c, uri);
                 if (c->errorpage)
                         c->errorpage = 0;
                 else
                         g_clear_object(&c->failedcert);
                 break;
         case WEBKIT_LOAD_REDIRECTED:
- setatom(c, AtomUri, title);
- c->title = title;
- seturiparameters(c, geturi(c));
+ setatom(c, AtomUri, uri);
+ c->title = uri;
+ seturiparameters(c, uri);
                 break;
         case WEBKIT_LOAD_COMMITTED:
                 c->https = webkit_web_view_get_tls_info(c->view, &c->cert,
Received on Fri May 12 2017 - 00:33:49 CEST

This archive was generated by hypermail 2.3.0 : Fri May 12 2017 - 00:36:19 CEST