[ovs-dev,5/7] Include headers where ovs_rundir is used
diff mbox

Message ID 1442951618-13080-6-git-send-email-aserdean@cloudbasesolutions.com
State Accepted
Headers show

Commit Message

Alin Serdean Sept. 22, 2015, 7:53 p.m. UTC
This patch includes dirs.h because ovs_rundir is used.

Found while compiling with MSVC x64.

Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
---
 lib/daemon-windows.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Gurucharan Shetty Sept. 23, 2015, 3:03 p.m. UTC | #1
On Tue, Sep 22, 2015 at 12:53 PM, Alin Serdean
<aserdean@cloudbasesolutions.com> wrote:
> This patch includes dirs.h because ovs_rundir is used.
>
> Found while compiling with MSVC x64.
>
> Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
> ---
>  lib/daemon-windows.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/lib/daemon-windows.c b/lib/daemon-windows.c
> index 04e1f1a..696ec1c 100644
> --- a/lib/daemon-windows.c
> +++ b/lib/daemon-windows.c
> @@ -17,6 +17,7 @@
>  #include <config.h>
>  #include "daemon.h"
>  #include "daemon-private.h"
> +#include "dirs.h"
>  #include <stdio.h>
>  #include <stdlib.h>
>  #include "ovs-thread.h"
According to CodingStyle, you need to add dirs.h below stdlib.h.


`#include` directives should appear in the following order:

1. `#include <config.h>`

2. The module's own headers, if any.  Including this before any
   other header (besides <config.h>) ensures that the module's
   header file is self-contained (see HEADER FILES) below.

3. Standard C library headers and other system headers, preferably
   in alphabetical order.  (Occasionally one encounters a set of
   system headers that must be included in a particular order, in
   which case that order must take precedence.)

4. Open vSwitch headers, in alphabetical order.  Use "", not <>,
   to specify Open vSwitch header names.

I changed it and applied.

> --
> 1.9.5.msysgit.0
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
Alin Serdean Sept. 23, 2015, 4:58 p.m. UTC | #2
Thanks!

> -----Mesaj original-----

> De la: Gurucharan Shetty [mailto:shettyg@nicira.com]

> Trimis: Wednesday, September 23, 2015 6:04 PM

> C─âtre: Alin Serdean <aserdean@cloudbasesolutions.com>

> Cc: dev@openvswitch.org

> Subiect: Re: [ovs-dev] [PATCH 5/7] Include headers where ovs_rundir is used

> 

> On Tue, Sep 22, 2015 at 12:53 PM, Alin Serdean

> <aserdean@cloudbasesolutions.com> wrote:

> > This patch includes dirs.h because ovs_rundir is used.

> >

> > Found while compiling with MSVC x64.

> >

> > Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>

> > ---

> >  lib/daemon-windows.c | 1 +

> >  1 file changed, 1 insertion(+)

> >

> > diff --git a/lib/daemon-windows.c b/lib/daemon-windows.c index

> > 04e1f1a..696ec1c 100644

> > --- a/lib/daemon-windows.c

> > +++ b/lib/daemon-windows.c

> > @@ -17,6 +17,7 @@

> >  #include <config.h>

> >  #include "daemon.h"

> >  #include "daemon-private.h"

> > +#include "dirs.h"

> >  #include <stdio.h>

> >  #include <stdlib.h>

> >  #include "ovs-thread.h"

> According to CodingStyle, you need to add dirs.h below stdlib.h.

> 

> 

> `#include` directives should appear in the following order:

> 

> 1. `#include <config.h>`

> 

> 2. The module's own headers, if any.  Including this before any

>    other header (besides <config.h>) ensures that the module's

>    header file is self-contained (see HEADER FILES) below.

> 

> 3. Standard C library headers and other system headers, preferably

>    in alphabetical order.  (Occasionally one encounters a set of

>    system headers that must be included in a particular order, in

>    which case that order must take precedence.)

> 

> 4. Open vSwitch headers, in alphabetical order.  Use "", not <>,

>    to specify Open vSwitch header names.

> 

> I changed it and applied.

> 

> > --

> > 1.9.5.msysgit.0

> > _______________________________________________

> > dev mailing list

> > dev@openvswitch.org

> > http://openvswitch.org/mailman/listinfo/dev

Patch
diff mbox

diff --git a/lib/daemon-windows.c b/lib/daemon-windows.c
index 04e1f1a..696ec1c 100644
--- a/lib/daemon-windows.c
+++ b/lib/daemon-windows.c
@@ -17,6 +17,7 @@ 
 #include <config.h>
 #include "daemon.h"
 #include "daemon-private.h"
+#include "dirs.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include "ovs-thread.h"