[hackers] [surf] Avoid using global name stylefile in setstyle() || Quentin Rameau

From: <git_AT_suckless.org>
Date: Sun, 30 Apr 2017 23:25:10 +0200 (CEST)

commit eb32dd6eca5b6224bb5fb28cadef5bd035581ef3
Author: Quentin Rameau <quinq_AT_fifth.space>
AuthorDate: Thu Apr 27 15:41:16 2017 +0200
Commit: Quentin Rameau <quinq_AT_fifth.space>
CommitDate: Thu Apr 27 15:41:16 2017 +0200

    Avoid using global name stylefile in setstyle()

diff --git a/surf.c b/surf.c
index 77e3d6f..4ead122 100644
--- a/surf.c
+++ b/surf.c
_AT_@ -163,7 +163,7 @@ static char cookiepolicy_set(const WebKitCookieAcceptPolicy p);
 static void seturiparameters(Client *c, const char *uri);
 static void setparameter(Client *c, int refresh, ParamName p, const Arg *a);
 static const char *getstyle(const char *uri);
-static void setstyle(Client *c, const char *stylefile);
+static void setstyle(Client *c, const char *file);
 static void runscript(Client *c);
 static void evalscript(Client *c, const char *jsstr, ...);
 static void updatewinid(Client *c);
_AT_@ -755,12 +755,12 @@ getstyle(const char *uri)
 }
 
 void
-setstyle(Client *c, const char *stylefile)
+setstyle(Client *c, const char *file)
 {
         gchar *style;
 
- if (!g_file_get_contents(stylefile, &style, NULL, NULL)) {
- fprintf(stderr, "Could not read style file: %s\n", stylefile);
+ if (!g_file_get_contents(file, &style, NULL, NULL)) {
+ fprintf(stderr, "Could not read style file: %s\n", file);
                 return;
         }
 
Received on Sun Apr 30 2017 - 23:25:10 CEST

This archive was generated by hypermail 2.3.0 : Sun Apr 30 2017 - 23:36:19 CEST