diff options
author | Andreas Schneider <mail@cynapses.org> | 2009-05-04 10:27:37 +0000 |
---|---|---|
committer | Andreas Schneider <mail@cynapses.org> | 2009-05-04 10:27:37 +0000 |
commit | d9a0b9070186d4e56dbb303efdc4eb5cb9cb98be (patch) | |
tree | 37ebe0780ca1e426ccae46e3f959804da78b1f61 /libssh | |
parent | 503bc1b95fbf8d7e15e77b7ad1498f6ceb93b597 (diff) | |
download | libssh-d9a0b9070186d4e56dbb303efdc4eb5cb9cb98be.tar.gz libssh-d9a0b9070186d4e56dbb303efdc4eb5cb9cb98be.tar.xz libssh-d9a0b9070186d4e56dbb303efdc4eb5cb9cb98be.zip |
Reformat count_ptrs().
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@707 7dcaeef0-15fb-0310-b436-a5af3365683c
Diffstat (limited to 'libssh')
-rw-r--r-- | libssh/channels.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/libssh/channels.c b/libssh/channels.c index 660edad..228b326 100644 --- a/libssh/channels.c +++ b/libssh/channels.c @@ -1703,12 +1703,13 @@ static int channel_protocol_select(CHANNEL **rchans, CHANNEL **wchans, return 0; } -/* just count number of pointers in the array */ -static int count_ptrs(CHANNEL **ptrs){ - int c; - for(c=0;ptrs[c];++c) - ; - return c; +/* Just count number of pointers in the array */ +static int count_ptrs(CHANNEL **ptrs) { + int c; + for (c = 0; ptrs[c] != NULL; c++) + ; + + return c; } /** the list of pointers are then actualized and will only contain pointers to |