diff options
author | Christian Pointner <equinox@spreadspace.org> | 2013-10-07 11:55:08 +0000 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2013-10-07 11:55:08 +0000 |
commit | 6c40ae29a879eb7d7a70cbea9e3ff16e643ccce7 (patch) | |
tree | 4c05ef3d015aa4747668cccc00238de88d1e25af /src/slist.c | |
parent | fixed build with -Wall (diff) |
whitespace cleanups
updated copyright notice
git-svn-id: https://svn.spreadspace.org/tcpproxy/trunk@68 e61f0598-a718-4e21-a8f0-0aadfa62ad6b
Diffstat (limited to 'src/slist.c')
-rw-r--r-- | src/slist.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/slist.c b/src/slist.c index 24da141..3195833 100644 --- a/src/slist.c +++ b/src/slist.c @@ -1,14 +1,14 @@ /* * tcpproxy * - * tcpproxy is a simple tcp connection proxy which combines the - * features of rinetd and 6tunnel. tcpproxy supports IPv4 and - * IPv6 and also supports connections from IPv6 to IPv4 + * tcpproxy is a simple tcp connection proxy which combines the + * features of rinetd and 6tunnel. tcpproxy supports IPv4 and + * IPv6 and also supports connections from IPv6 to IPv4 * endpoints and vice versa. - * * - * Copyright (C) 2010-2011 Christian Pointner <equinox@spreadspace.org> - * + * + * Copyright (C) 2010-2013 Christian Pointner <equinox@spreadspace.org> + * * This file is part of tcpproxy. * * tcpproxy is free software: you can redistribute it and/or modify @@ -36,10 +36,10 @@ slist_element_t* slist_get_last(slist_element_t* first) { if(!first) return NULL; - + while(first->next_) first = first->next_; - + return first; } @@ -62,7 +62,7 @@ slist_element_t* slist_add(slist_t* lst, void* data) slist_element_t* new_element = malloc(sizeof(slist_element_t)); if(!new_element) return NULL; - + new_element->data_ = data; new_element->next_ = NULL; @@ -70,7 +70,7 @@ slist_element_t* slist_add(slist_t* lst, void* data) lst->first_ = new_element; else slist_get_last(lst->first_)->next_ = new_element; - + return new_element; } @@ -104,7 +104,7 @@ void slist_clear(slist_t* lst) { if(!lst || !lst->first_) return; - + do { slist_element_t* deletee = lst->first_; lst->first_ = lst->first_->next_; @@ -112,7 +112,7 @@ void slist_clear(slist_t* lst) free(deletee); } while(lst->first_); - + lst->first_ = NULL; } @@ -120,11 +120,11 @@ int slist_length(slist_t* lst) { if(!lst || !lst->first_) return 0; - + int len = 0; slist_element_t* tmp; for(tmp = lst->first_; tmp; tmp = tmp->next_) len++; - + return len; } |