diff options
author | Nick White <hg@njw.me.uk> | 2011-07-16 23:24:57 +0100 |
---|---|---|
committer | Nick White <hg@njw.me.uk> | 2011-07-16 23:24:57 +0100 |
commit | c2892e23ef3aa063812714323b5e8f9ebe0fc318 (patch) | |
tree | da14d04c45d0532ae189395f95289290e1e1d905 /getgbook.c | |
parent | dc5eb36ac3a77bce841fafbef996bf4466ff7519 (diff) |
Clean up pointer arithmetic
Diffstat (limited to 'getgbook.c')
-rw-r--r-- | getgbook.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -63,7 +63,7 @@ int gettotalpages(char *bookid) if((c = strstr(buf," pages</dc:format>")) == NULL) return 0; - while(*c && *c != '>') *c--; + while(*c && *c != '>') c--; sscanf(c+1, "%d ", &total); return total; @@ -94,7 +94,7 @@ Page *getpagedetail(char *bookid, char *pg) free(buf); return page; } - for(p=page->url, d=c+strlen(m)+8; *d && *d != '"'; *d++, *p++) { + for(p=page->url, d=c+strlen(m)+8; *d && *d != '"'; d++, p++) { if(!strncmp(d, "\\u0026", 6)) { *p = '&'; d+=5; @@ -103,7 +103,7 @@ Page *getpagedetail(char *bookid, char *pg) } *p = '\0'; - for(; *d; *d++) { + for(; *d; d++) { if(*d == '}') { break; } |