[pisa-src] r1265 - trunk/pisacd/cdmain.c

  • From: Thomas Jansen <mithi@xxxxxxxxx>
  • To: pisa-src@xxxxxxxxxxxxx
  • Date: Wed, 21 Oct 2009 17:41:08 +0200

Author: tjansen
Date: Wed Oct 21 17:41:07 2009
New Revision: 1265

Log:
Simplified "if (a) {} else {...}" to "if (!a) {...}".

Modified:
   trunk/pisacd/cdmain.c

Modified: trunk/pisacd/cdmain.c
==============================================================================
--- trunk/pisacd/cdmain.c       Wed Oct 21 17:22:31 2009        (r1264)
+++ trunk/pisacd/cdmain.c       Wed Oct 21 17:41:07 2009        (r1265)
@@ -266,8 +266,7 @@
                 * Inline once PREAUTH is gone. -- Thomas */
                maxfd = cd_get_maxfd();
 
-               if ((ret = select(maxfd + 1, &readfds, NULL, NULL, NULL)) <= 0) 
{
-               } else {
+               if ((ret = select(maxfd + 1, &readfds, NULL, NULL, NULL)) > 0) {
                        if (cd_ctx.is_cd_running) {
                                if (FD_ISSET(cd_ctx.tunnel, &readfds))
                                        pisa_cd_copy_from_tun_to_sock();

Other related posts:

  • » [pisa-src] r1265 - trunk/pisacd/cdmain.c - Thomas Jansen