Giter VIP home page Giter VIP logo

coccinellery's Introduction

Coccinellery: A gallery of semantic patches for use with Coccinelle
http://coccinellery.org/

Coccinellery Links
Github repository: https://github.com/coccinelle/coccinellery
Download all files (zip): https://github.com/coccinelle/coccinellery/archive/master.zip

Coccinelle Info
Coccinelle Home: http://coccinelle.lip6.fr/
Contacts: http://coccinelle.lip6.fr/contact.php

This is a gallery of semantic patches for use with Coccinelle
(http://coccinelle.lip6.fr/). They are extracted automatically from a
collection of semantic patches that have been used to create patches for the
Linux Kernel and other software. The descriptions are derived from the commit
messages contained in those patches. There is no guarantee that the
descriptions are correct or understandable, and no guarantee that the semantic
patches are correct, complete, or work with the latest version of Coccinelle.
Comments and corrections may be sent to the Coccinelle mailing list:
[email protected] / https://systeme.lip6.fr/mailman/listinfo/cocci.

To propose new semantic patches to be added to the gallery, please make a pull
request (https://help.github.com/articles/fork-a-repo) via Github to
Coccinellery repository (https://github.com/coccinelle/coccinellery). When
adding new semantic patches, please create a folder for you under the CONTRIB
directory. Detailed instructions on the README file of the CONTRIB directory.

The semantic patches are licensed under the permissive ISC license. More info
at LICENSE file or http://www.isc.org/software/license.


----------------------------------------------------------------------
Target: Generic


----------------------------------------------------------------------
Target: Linux


----------------------------------------------------------------------
Target: Firehose

CONTRIB/firehose/arref/arref.cocci -  Adjust array index
	Convert array index from the loop bound to the loop index.

CONTRIB/firehose/badand/badand.cocci -  Convert && to ||
	The pattern !E && !E->fld is nonsensical.  The patch below updates this
	according to the assumption that && should be ||.  But perhaps another
	solution was intended.

CONTRIB/firehose/badkm2/badkm2.cocci -  Ensure a consistent return value in error case
	Typically, the return value desired for the failure of a function with an
	integer return value is a negative integer.  In these cases, the return
	value is sometimes a negative integer and sometimes 0, due to a subsequent
	initialization of the return variable within the loop.

CONTRIB/firehose/bitcall/bitcall.cocci -  convert & to &&
	The use of & to obtain a conjunction that evaluates both of its arguments
	seems unnecessarily tricky.

CONTRIB/firehose/da/da.cocci -  Correct double assignment
	The double assignment is meant to be a bit-or to combine two values.

CONTRIB/firehose/double_null/double_null.cocci -  Correct NULL test
	Test the value that was just allocated rather than the previously tested one.

CONTRIB/firehose/doubleinit/doubleinit.cocci -  Remove duplicate structure field initialization
	The definition of uml_netdev_ops has initializations of a local function
	and eth_mac_addr for its ndo_set_mac_address field.  This change uses only
	the local function.

CONTRIB/firehose/doubletest/doubletest.cocci -  Remove double test
	The current code tests the gpio_vid0 field twice.  Test the gpio_vid1
	fields in place of the second gpio_vid0 test.

CONTRIB/firehose/drop_continue/drop_continue.cocci -  Drop unnecessary continue
	Continue is not needed at the bottom of a loop.

CONTRIB/firehose/if-semicolon/if-semicolon.cocci -  Detect semicolon after if
	Detect a semicolon after if(...) that is preventing the error check to
	work correctly. Removing this semicolon will change the code behavior,
	but this is intended.

CONTRIB/firehose/ifaddr/ifaddr.cocci -  Test of a variable/field address
	the address of a variable or field is non-zero is likely always to bo
	non-zero

CONTRIB/firehose/noderef/noderef.cocci -  Correct size computation
	The size argument to kcalloc should be the size of desired structure,
	not the pointer to it.

CONTRIB/firehose/ret/ret.cocci -  Useless goto and return
	Useless goto and return


coccinellery's People

Contributors

matthieucan avatar petersenna avatar rrhansen avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.