torrentd

simple torrent daemon
git clone git@git.2f30.org/torrentd.git
Log | Files | Refs | LICENSE

commit 4f352f07c82223e1d9ef917457488eb56eea447b
parent 7574f53a653835bc062ed42281dc93406b01b22c
Author: sin <sin@2f30.org>
Date:   Sat, 19 Dec 2015 11:28:28 +0000

Less typing

Diffstat:
Mben.c | 8++++----
Mstorrent.h | 4++--
2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/ben.c b/ben.c @@ -23,7 +23,7 @@ static char * parsestr(char *s, char *e, struct ben **b) { char *p; - long long int len = 0; + long long len = 0; for (p = s; p != e && isdigit((int)*p); p++) len = len * 10 + *p - '0'; @@ -47,7 +47,7 @@ static char * parseint(char *s, char *e, struct ben **b) { char *p = s; - long long int v; + long long v; int isneg = 0, iszero = 0; if (*p != 'i') @@ -93,7 +93,7 @@ parsedl(char *s, char *e, struct ben **b) struct ben head; struct ben *bp = &head; int type = *p; - long long int len = 0; + long long len = 0; memset(&head, 0, sizeof(head)); if (*p != 'd' && *p != 'l') @@ -177,7 +177,7 @@ bstr2str(struct ben *b) int bstrcmp(struct ben *a, struct ben *b) { - long long int i; + long long i; if (a->type != 's' || b->type != 's') return 1; diff --git a/storrent.h b/storrent.h @@ -5,8 +5,8 @@ struct ben { struct ben *v; char *start, *end; char *s; - long long int i; - long long int len; + long long i; + long long len; struct ben *next; };