summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick White <hg@njw.me.uk>2011-08-07 12:32:22 +0100
committerNick White <hg@njw.me.uk>2011-08-07 12:32:22 +0100
commit3d08e78700331588f6d43db725cc361f841c012d (patch)
treeaa0b31fff2d797922d0e56089072a4d318d868a7
parentdb6e6ae080819018bd17760e846fca4e85688cee (diff)
Neaten code
-rw-r--r--getgbook.c2
-rw-r--r--util.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/getgbook.c b/getgbook.c
index 0ffda13..b4a23af 100644
--- a/getgbook.c
+++ b/getgbook.c
@@ -38,7 +38,7 @@ Page *getpagedetail(char *bookid, char *pg, char *cookie)
if(!(c = strstr(buf,m)))
return NULL;
- page = malloc(sizeof(Page));
+ page = malloc(sizeof(*page));
strncpy(page->name, pg, STRMAX);
page->url[0] = '\0';
page->num = -1;
diff --git a/util.h b/util.h
index 11677af..2e852ab 100644
--- a/util.h
+++ b/util.h
@@ -2,5 +2,5 @@
#define COOKIEMAX 1024
#define HEADERMAX 1024
int dial(char *host, char *port);
-int get(char *host, char *path, char *sendcookie, char *savecookie, char **buf);
+int get(char *host, char *path, char *sendcookie, char *savecookie, char **buf);
int gettofile(char *host, char *url, char *sendcookie, char *savecookie, char *savepath);