Some additional whitespace cleanup for PPP code
authorMarcel Holtmann <marcel@holtmann.org>
Tue, 23 Mar 2010 03:01:28 +0000 (20:01 -0700)
committerMarcel Holtmann <marcel@holtmann.org>
Tue, 23 Mar 2010 03:01:28 +0000 (20:01 -0700)
gatchat/ppp.c
gatchat/ppp.h
gatchat/ppp_auth.c
gatchat/ppp_cp.c
gatchat/ppp_lcp.c

index a9972d4..4612976 100644 (file)
@@ -409,7 +409,6 @@ static void ppp_transition_phase(GAtPPP *ppp, enum ppp_phase phase)
                ppp_network(ppp);
                break;
        }
-
 }
 
 static void ppp_handle_event(GAtPPP *ppp)
index b6797f5..9902551 100644 (file)
@@ -18,6 +18,7 @@
  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  *
  */
+
 #include "ppp_cp.h"
 
 #define DEFAULT_MRU    1500
index c23d9ad..d618112 100644 (file)
@@ -153,7 +153,7 @@ static void chap_process_packet(gpointer priv, guint8 *new_packet)
                chap_process_failure(data, new_packet);
                break;
        default:
-               g_print("unknown auth code\n");
+               g_print("Unknown auth code\n");
                break;
        }
 }
index ac1f6e6..ab10bba 100644 (file)
@@ -30,6 +30,7 @@
 #include <termios.h>
 #include <glib.h>
 #include <arpa/inet.h>
+
 #include "gatppp.h"
 #include "ppp.h"
 
@@ -95,6 +96,7 @@ static gboolean pppcp_timeout(gpointer user_data)
                pppcp_generate_event(data, TO_PLUS, NULL, 0);
        else
                pppcp_generate_event(data, TO_MINUS, NULL, 0);
+
        return FALSE;
 }
 
@@ -224,7 +226,7 @@ static void pppcp_zero_restart_count(struct pppcp_data *data)
  */
 static guint8 new_identity(struct pppcp_data *data, guint prev_identifier)
 {
-       return prev_identifier+1;
+       return prev_identifier + 1;
 }
 
 static void get_option_length(gpointer data, gpointer user_data)
@@ -1413,10 +1415,11 @@ void pppcp_process_packet(gpointer priv, guint8 *new_packet)
                return;
 
        /* check flags to see if we support this code */
-       if (!(data->valid_codes & (1 << packet->code))) {
+       if (!(data->valid_codes & (1 << packet->code)))
                event_type = RUC;
-       else
+       else
                event_type = data->packet_ops[packet->code-1](data, packet);
+
        if (event_type) {
                data_len = ntohs(packet->length);
                event_data = packet;
index 644842a..0892b2c 100644 (file)
 #include <termios.h>
 #include <glib.h>
 #include <arpa/inet.h>
+
 #include "gatppp.h"
 #include "ppp.h"
 
 enum lcp_options {
-       RESERVED        = 0,
-       MRU             = 1,
-       ACCM            = 2,
-       AUTH_PROTO      = 3,
-       QUAL_PROTO      = 4,
-       MAGIC_NUMBER    = 5,
+       RESERVED                = 0,
+       MRU                     = 1,
+       ACCM                    = 2,
+       AUTH_PROTO              = 3,
+       QUAL_PROTO              = 4,
+       MAGIC_NUMBER            = 5,
        DEPRECATED_QUAL_PROTO   = 6,
        PFC                     = 7,
        ACFC                    = 8,