diff mbox

[ovs-dev] ovn-nbctl: Avoid minor code duplication.

Message ID 1443799027-10824-1-git-send-email-blp@nicira.com
State Accepted
Headers show

Commit Message

Ben Pfaff Oct. 2, 2015, 3:17 p.m. UTC
Signed-off-by: Ben Pfaff <blp@nicira.com>
---
 ovn/utilities/ovn-nbctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Justin Pettit Oct. 2, 2015, 3:21 p.m. UTC | #1
Acked-by: Justin Pettit <jpettit@nicira.com>

--Justin


> On Oct 2, 2015, at 8:17 AM, Ben Pfaff <blp@nicira.com> wrote:
> 
> Signed-off-by: Ben Pfaff <blp@nicira.com>
> ---
> ovn/utilities/ovn-nbctl.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/ovn/utilities/ovn-nbctl.c b/ovn/utilities/ovn-nbctl.c
> index c308ddc..2d2a5ee 100644
> --- a/ovn/utilities/ovn-nbctl.c
> +++ b/ovn/utilities/ovn-nbctl.c
> @@ -142,7 +142,7 @@ nbctl_default_db(void)
>     if (!def) {
>         def = getenv("OVN_NB_DB");
>         if (!def) {
> -            def = xasprintf("unix:%s/db.sock", ovs_rundir());
> +            def = ctl_default_db();
>         }
>     }
>     return def;
> -- 
> 2.1.3
> 
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
Ben Pfaff Oct. 2, 2015, 3:23 p.m. UTC | #2
Thanks, applied.

On Fri, Oct 02, 2015 at 08:21:39AM -0700, Justin Pettit wrote:
> Acked-by: Justin Pettit <jpettit@nicira.com>
> 
> --Justin
> 
> 
> > On Oct 2, 2015, at 8:17 AM, Ben Pfaff <blp@nicira.com> wrote:
> > 
> > Signed-off-by: Ben Pfaff <blp@nicira.com>
> > ---
> > ovn/utilities/ovn-nbctl.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/ovn/utilities/ovn-nbctl.c b/ovn/utilities/ovn-nbctl.c
> > index c308ddc..2d2a5ee 100644
> > --- a/ovn/utilities/ovn-nbctl.c
> > +++ b/ovn/utilities/ovn-nbctl.c
> > @@ -142,7 +142,7 @@ nbctl_default_db(void)
> >     if (!def) {
> >         def = getenv("OVN_NB_DB");
> >         if (!def) {
> > -            def = xasprintf("unix:%s/db.sock", ovs_rundir());
> > +            def = ctl_default_db();
> >         }
> >     }
> >     return def;
> > -- 
> > 2.1.3
> > 
> > _______________________________________________
> > dev mailing list
> > dev@openvswitch.org
> > http://openvswitch.org/mailman/listinfo/dev
>
diff mbox

Patch

diff --git a/ovn/utilities/ovn-nbctl.c b/ovn/utilities/ovn-nbctl.c
index c308ddc..2d2a5ee 100644
--- a/ovn/utilities/ovn-nbctl.c
+++ b/ovn/utilities/ovn-nbctl.c
@@ -142,7 +142,7 @@  nbctl_default_db(void)
     if (!def) {
         def = getenv("OVN_NB_DB");
         if (!def) {
-            def = xasprintf("unix:%s/db.sock", ovs_rundir());
+            def = ctl_default_db();
         }
     }
     return def;