summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick White <git@njw.me.uk>2012-07-10 22:52:33 +0100
committerNick White <git@njw.me.uk>2012-07-10 22:52:33 +0100
commit94ec3569e3c42693045ee33c36152526cdf46f78 (patch)
treed15cf50f92bbf05a5b2f4a31704040f396be97a8
parent5ec812de4c16f7046676b0e99a71b105a898b2f1 (diff)
Clean up style
-rw-r--r--getabook.c3
-rw-r--r--getgbook.c3
-rw-r--r--util.c3
3 files changed, 5 insertions, 4 deletions
diff --git a/getabook.c b/getabook.c
index 524fd20..0ad6944 100644
--- a/getabook.c
+++ b/getabook.c
@@ -64,7 +64,8 @@ int fillurls(char *buf) {
int getpagelist()
{
- char url[URLMAX], b[STRMAX] = "";
+ char url[URLMAX];
+ char b[STRMAX] = "";
char *buf = NULL;
char *s, *c;
int i;
diff --git a/getgbook.c b/getgbook.c
index 77893f6..2042a75 100644
--- a/getgbook.c
+++ b/getgbook.c
@@ -77,7 +77,8 @@ int getpagelist()
int getpageurls(char *pagecode, char *cookie)
{
char url[URLMAX], code[STRMAX], m[STRMAX];
- char *c = NULL, *d, *p, *q, *buf = NULL;
+ char *c = NULL, *buf = NULL;
+ char *d, *p, *q;
int i, j;
snprintf(url, URLMAX, "/books?id=%s&pg=%s&jscmd=click3&q=subject:a&redir_esc=y", bookid, pagecode);
diff --git a/util.c b/util.c
index c25181e..54a0a64 100644
--- a/util.c
+++ b/util.c
@@ -57,8 +57,7 @@ int request(char *host, char *request, char *savecookie, char **body) {
char *headpos;
size_t headsize;
char headline[BUFSIZ] = "";
- char *buf;
- char *cur, *pos;
+ char *buf, *cur, *pos;
if((fd = dial(host, "80")) == -1) return 0;