summaryrefslogtreecommitdiff
path: root/drivers/net/ppp_deflate.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ppp_deflate.c')
-rw-r--r--drivers/net/ppp_deflate.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/drivers/net/ppp_deflate.c b/drivers/net/ppp_deflate.c
index 034c1c650bcb..695bc83e0cfd 100644
--- a/drivers/net/ppp_deflate.c
+++ b/drivers/net/ppp_deflate.c
@@ -111,11 +111,11 @@ static void *z_comp_alloc(unsigned char *options, int opt_len)
struct ppp_deflate_state *state;
int w_size;
- if (opt_len != CILEN_DEFLATE
- || (options[0] != CI_DEFLATE && options[0] != CI_DEFLATE_DRAFT)
- || options[1] != CILEN_DEFLATE
- || DEFLATE_METHOD(options[2]) != DEFLATE_METHOD_VAL
- || options[3] != DEFLATE_CHK_SEQUENCE)
+ if (opt_len != CILEN_DEFLATE ||
+ (options[0] != CI_DEFLATE && options[0] != CI_DEFLATE_DRAFT) ||
+ options[1] != CILEN_DEFLATE ||
+ DEFLATE_METHOD(options[2]) != DEFLATE_METHOD_VAL ||
+ options[3] != DEFLATE_CHK_SEQUENCE)
return NULL;
w_size = DEFLATE_SIZE(options[2]);
if (w_size < DEFLATE_MIN_SIZE || w_size > DEFLATE_MAX_SIZE)
@@ -163,12 +163,12 @@ static int z_comp_init(void *arg, unsigned char *options, int opt_len,
{
struct ppp_deflate_state *state = (struct ppp_deflate_state *) arg;
- if (opt_len < CILEN_DEFLATE
- || (options[0] != CI_DEFLATE && options[0] != CI_DEFLATE_DRAFT)
- || options[1] != CILEN_DEFLATE
- || DEFLATE_METHOD(options[2]) != DEFLATE_METHOD_VAL
- || DEFLATE_SIZE(options[2]) != state->w_size
- || options[3] != DEFLATE_CHK_SEQUENCE)
+ if (opt_len < CILEN_DEFLATE ||
+ (options[0] != CI_DEFLATE && options[0] != CI_DEFLATE_DRAFT) ||
+ options[1] != CILEN_DEFLATE ||
+ DEFLATE_METHOD(options[2]) != DEFLATE_METHOD_VAL ||
+ DEFLATE_SIZE(options[2]) != state->w_size ||
+ options[3] != DEFLATE_CHK_SEQUENCE)
return 0;
state->seqno = 0;
@@ -330,11 +330,11 @@ static void *z_decomp_alloc(unsigned char *options, int opt_len)
struct ppp_deflate_state *state;
int w_size;
- if (opt_len != CILEN_DEFLATE
- || (options[0] != CI_DEFLATE && options[0] != CI_DEFLATE_DRAFT)
- || options[1] != CILEN_DEFLATE
- || DEFLATE_METHOD(options[2]) != DEFLATE_METHOD_VAL
- || options[3] != DEFLATE_CHK_SEQUENCE)
+ if (opt_len != CILEN_DEFLATE ||
+ (options[0] != CI_DEFLATE && options[0] != CI_DEFLATE_DRAFT) ||
+ options[1] != CILEN_DEFLATE ||
+ DEFLATE_METHOD(options[2]) != DEFLATE_METHOD_VAL ||
+ options[3] != DEFLATE_CHK_SEQUENCE)
return NULL;
w_size = DEFLATE_SIZE(options[2]);
if (w_size < DEFLATE_MIN_SIZE || w_size > DEFLATE_MAX_SIZE)
@@ -381,12 +381,12 @@ static int z_decomp_init(void *arg, unsigned char *options, int opt_len,
{
struct ppp_deflate_state *state = (struct ppp_deflate_state *) arg;
- if (opt_len < CILEN_DEFLATE
- || (options[0] != CI_DEFLATE && options[0] != CI_DEFLATE_DRAFT)
- || options[1] != CILEN_DEFLATE
- || DEFLATE_METHOD(options[2]) != DEFLATE_METHOD_VAL
- || DEFLATE_SIZE(options[2]) != state->w_size
- || options[3] != DEFLATE_CHK_SEQUENCE)
+ if (opt_len < CILEN_DEFLATE ||
+ (options[0] != CI_DEFLATE && options[0] != CI_DEFLATE_DRAFT) ||
+ options[1] != CILEN_DEFLATE ||
+ DEFLATE_METHOD(options[2]) != DEFLATE_METHOD_VAL ||
+ DEFLATE_SIZE(options[2]) != state->w_size ||
+ options[3] != DEFLATE_CHK_SEQUENCE)
return 0;
state->seqno = 0;