diff options
author | Weilong Chen <chenweilong@huawei.com> | 2013-12-31 02:11:28 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-01-02 03:30:36 -0500 |
commit | dd9b45598a7198f8b12965f2ec453bcb5cb90aec (patch) | |
tree | b7b5fde731bb2301082b2ed082b4b92f3a4903f5 /net/ipv4/ip_options.c | |
parent | 442c67f8448321c1919ddb33524cc4ecaa9a94f3 (diff) |
ipv4: switch and case should be at the same indent
Signed-off-by: Weilong Chen <chenweilong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ip_options.c')
-rw-r--r-- | net/ipv4/ip_options.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/net/ipv4/ip_options.c b/net/ipv4/ip_options.c index dd9d90b44f97..f4ab72e19af9 100644 --- a/net/ipv4/ip_options.c +++ b/net/ipv4/ip_options.c | |||
@@ -275,7 +275,7 @@ int ip_options_compile(struct net *net, | |||
275 | 275 | ||
276 | for (l = opt->optlen; l > 0; ) { | 276 | for (l = opt->optlen; l > 0; ) { |
277 | switch (*optptr) { | 277 | switch (*optptr) { |
278 | case IPOPT_END: | 278 | case IPOPT_END: |
279 | for (optptr++, l--; l > 0; optptr++, l--) { | 279 | for (optptr++, l--; l > 0; optptr++, l--) { |
280 | if (*optptr != IPOPT_END) { | 280 | if (*optptr != IPOPT_END) { |
281 | *optptr = IPOPT_END; | 281 | *optptr = IPOPT_END; |
@@ -283,7 +283,7 @@ int ip_options_compile(struct net *net, | |||
283 | } | 283 | } |
284 | } | 284 | } |
285 | goto eol; | 285 | goto eol; |
286 | case IPOPT_NOOP: | 286 | case IPOPT_NOOP: |
287 | l--; | 287 | l--; |
288 | optptr++; | 288 | optptr++; |
289 | continue; | 289 | continue; |
@@ -294,8 +294,8 @@ int ip_options_compile(struct net *net, | |||
294 | goto error; | 294 | goto error; |
295 | } | 295 | } |
296 | switch (*optptr) { | 296 | switch (*optptr) { |
297 | case IPOPT_SSRR: | 297 | case IPOPT_SSRR: |
298 | case IPOPT_LSRR: | 298 | case IPOPT_LSRR: |
299 | if (optlen < 3) { | 299 | if (optlen < 3) { |
300 | pp_ptr = optptr + 1; | 300 | pp_ptr = optptr + 1; |
301 | goto error; | 301 | goto error; |
@@ -321,7 +321,7 @@ int ip_options_compile(struct net *net, | |||
321 | opt->is_strictroute = (optptr[0] == IPOPT_SSRR); | 321 | opt->is_strictroute = (optptr[0] == IPOPT_SSRR); |
322 | opt->srr = optptr - iph; | 322 | opt->srr = optptr - iph; |
323 | break; | 323 | break; |
324 | case IPOPT_RR: | 324 | case IPOPT_RR: |
325 | if (opt->rr) { | 325 | if (opt->rr) { |
326 | pp_ptr = optptr; | 326 | pp_ptr = optptr; |
327 | goto error; | 327 | goto error; |
@@ -349,7 +349,7 @@ int ip_options_compile(struct net *net, | |||
349 | } | 349 | } |
350 | opt->rr = optptr - iph; | 350 | opt->rr = optptr - iph; |
351 | break; | 351 | break; |
352 | case IPOPT_TIMESTAMP: | 352 | case IPOPT_TIMESTAMP: |
353 | if (opt->ts) { | 353 | if (opt->ts) { |
354 | pp_ptr = optptr; | 354 | pp_ptr = optptr; |
355 | goto error; | 355 | goto error; |
@@ -369,13 +369,13 @@ int ip_options_compile(struct net *net, | |||
369 | goto error; | 369 | goto error; |
370 | } | 370 | } |
371 | switch (optptr[3]&0xF) { | 371 | switch (optptr[3]&0xF) { |
372 | case IPOPT_TS_TSONLY: | 372 | case IPOPT_TS_TSONLY: |
373 | if (skb) | 373 | if (skb) |
374 | timeptr = &optptr[optptr[2]-1]; | 374 | timeptr = &optptr[optptr[2]-1]; |
375 | opt->ts_needtime = 1; | 375 | opt->ts_needtime = 1; |
376 | optptr[2] += 4; | 376 | optptr[2] += 4; |
377 | break; | 377 | break; |
378 | case IPOPT_TS_TSANDADDR: | 378 | case IPOPT_TS_TSANDADDR: |
379 | if (optptr[2]+7 > optptr[1]) { | 379 | if (optptr[2]+7 > optptr[1]) { |
380 | pp_ptr = optptr + 2; | 380 | pp_ptr = optptr + 2; |
381 | goto error; | 381 | goto error; |
@@ -389,7 +389,7 @@ int ip_options_compile(struct net *net, | |||
389 | opt->ts_needtime = 1; | 389 | opt->ts_needtime = 1; |
390 | optptr[2] += 8; | 390 | optptr[2] += 8; |
391 | break; | 391 | break; |
392 | case IPOPT_TS_PRESPEC: | 392 | case IPOPT_TS_PRESPEC: |
393 | if (optptr[2]+7 > optptr[1]) { | 393 | if (optptr[2]+7 > optptr[1]) { |
394 | pp_ptr = optptr + 2; | 394 | pp_ptr = optptr + 2; |
395 | goto error; | 395 | goto error; |
@@ -405,7 +405,7 @@ int ip_options_compile(struct net *net, | |||
405 | opt->ts_needtime = 1; | 405 | opt->ts_needtime = 1; |
406 | optptr[2] += 8; | 406 | optptr[2] += 8; |
407 | break; | 407 | break; |
408 | default: | 408 | default: |
409 | if (!skb && !ns_capable(net->user_ns, CAP_NET_RAW)) { | 409 | if (!skb && !ns_capable(net->user_ns, CAP_NET_RAW)) { |
410 | pp_ptr = optptr + 3; | 410 | pp_ptr = optptr + 3; |
411 | goto error; | 411 | goto error; |
@@ -433,7 +433,7 @@ int ip_options_compile(struct net *net, | |||
433 | } | 433 | } |
434 | opt->ts = optptr - iph; | 434 | opt->ts = optptr - iph; |
435 | break; | 435 | break; |
436 | case IPOPT_RA: | 436 | case IPOPT_RA: |
437 | if (optlen < 4) { | 437 | if (optlen < 4) { |
438 | pp_ptr = optptr + 1; | 438 | pp_ptr = optptr + 1; |
439 | goto error; | 439 | goto error; |
@@ -441,7 +441,7 @@ int ip_options_compile(struct net *net, | |||
441 | if (optptr[2] == 0 && optptr[3] == 0) | 441 | if (optptr[2] == 0 && optptr[3] == 0) |
442 | opt->router_alert = optptr - iph; | 442 | opt->router_alert = optptr - iph; |
443 | break; | 443 | break; |
444 | case IPOPT_CIPSO: | 444 | case IPOPT_CIPSO: |
445 | if ((!skb && !ns_capable(net->user_ns, CAP_NET_RAW)) || opt->cipso) { | 445 | if ((!skb && !ns_capable(net->user_ns, CAP_NET_RAW)) || opt->cipso) { |
446 | pp_ptr = optptr; | 446 | pp_ptr = optptr; |
447 | goto error; | 447 | goto error; |
@@ -452,9 +452,9 @@ int ip_options_compile(struct net *net, | |||
452 | goto error; | 452 | goto error; |
453 | } | 453 | } |
454 | break; | 454 | break; |
455 | case IPOPT_SEC: | 455 | case IPOPT_SEC: |
456 | case IPOPT_SID: | 456 | case IPOPT_SID: |
457 | default: | 457 | default: |
458 | if (!skb && !ns_capable(net->user_ns, CAP_NET_RAW)) { | 458 | if (!skb && !ns_capable(net->user_ns, CAP_NET_RAW)) { |
459 | pp_ptr = optptr; | 459 | pp_ptr = optptr; |
460 | goto error; | 460 | goto error; |