26 Jan, 2017

1 commit


30 Jun, 2016

1 commit


10 May, 2016

1 commit

  • It is easier to understand that the returned value of a specific function
    doesn't have to be 0 when the functions was successful when the actual
    return type is bool. This is especially true when all surrounding functions
    with return type int use negative values to return the error code.

    Reported-by: Nicholas Krause
    Signed-off-by: Sven Eckelmann
    Signed-off-by: Marek Lindner
    Signed-off-by: Antonio Quartulli

    Sven Eckelmann
     

02 Feb, 2016

3 commits


25 Aug, 2015

1 commit


07 Jun, 2015

1 commit

  • The header files could not be build indepdent from each other. This is
    happened because headers didn't include the files for things they've used.
    This was problematic because the success of a build depended on the
    knowledge about the right order of local includes.

    Also source files were not including everything they've used explicitly.
    Instead they required that transitive includes are always stable. This is
    problematic because some transitive includes are not obvious, depend on
    config settings and may not be stable in the future.

    The order for include blocks are:

    * primary headers (main.h and the *.h file of a *.c file)
    * global linux headers
    * required local headers
    * extra forward declarations for pointers in function/struct declarations

    The only exceptions are linux/bitops.h and linux/if_ether.h in packet.h.
    This header file is shared with userspace applications like batctl and must
    therefore build together with userspace applications. The header
    linux/bitops.h is not part of the uapi headers and linux/if_ether.h
    conflicts with the musl implementation of netinet/if_ether.h. The
    maintainers rejected the use of __KERNEL__ preprocessor checks and thus
    these two headers are only in main.h. All files using packet.h first have
    to include main.h to work correctly.

    Reported-by: Markus Pargmann
    Signed-off-by: Sven Eckelmann
    Signed-off-by: Marek Lindner

    Sven Eckelmann
     

29 May, 2015

1 commit


08 Jan, 2015

1 commit


12 Jan, 2014

1 commit


09 Jan, 2014

1 commit


19 Jan, 2013

1 commit


29 Oct, 2012

1 commit

  • batadv_bit_get_packet checks for all common situations before it decides that
    the new received packet indicates that the host was restarted. This extra
    condition check at the end of the function is not necessary because this
    condition is always true.

    This patch addresses Coverity #712296: Logically dead code

    Signed-off-by: Sven Eckelmann
    Signed-off-by: Antonio Quartulli

    Sven Eckelmann
     

02 Jul, 2012

2 commits


28 Jun, 2012

1 commit


25 Jun, 2012

2 commits


21 Jun, 2012

2 commits


11 Apr, 2012

1 commit


28 Feb, 2012

1 commit


17 Feb, 2012

1 commit


20 Nov, 2011

1 commit


22 Aug, 2011

1 commit


20 Jun, 2011

2 commits

  • char was used in different places to store information without really
    using the characteristics of that data type or by ignoring the fact that
    char has not a well defined signedness.

    Signed-off-by: Sven Eckelmann

    Sven Eckelmann
     
  • count_real_packets() in batman-adv assumes char is signed, and returns -1
    through it:

    net/batman-adv/routing.c: In function 'receive_bat_packet':
    net/batman-adv/routing.c:739: warning: comparison is always false due to limited range of data type

    Use int instead.

    Signed-off-by: David Howells
    [sven@narfation.org: Rebase on top of current version]
    Signed-off-by: Sven Eckelmann

    David Howells
     

30 May, 2011

2 commits


31 Jan, 2011

1 commit


17 Dec, 2010

1 commit

  • B.A.T.M.A.N. (better approach to mobile ad-hoc networking) is a routing
    protocol for multi-hop ad-hoc mesh networks. The networks may be wired or
    wireless. See http://www.open-mesh.org/ for more information and user space
    tools.

    Signed-off-by: Sven Eckelmann
    Signed-off-by: David S. Miller

    Sven Eckelmann