Re: [libvirt] [PATCH] Add function that raises error if domain is not active

2018-04-13 Thread Michal Privoznik
On 04/13/2018 02:49 PM, Clementine Hayat wrote: > > I'll take a look into coccinelle. It may take a bit more time thought. > Yeah, don't waste too much time on it. I merely just wanted to mention it. It not that trivial to learn. But once you do, it's awesome tool. Michal -- libvir-list

Re: [libvirt] [PATCH] Add function that raises error if domain is not active

2018-04-13 Thread Clementine Hayat
2018-04-13 8:25 GMT+00:00 Erik Skultety : > On Fri, Apr 13, 2018 at 09:45:48AM +0200, Michal Privoznik wrote: >> On 04/13/2018 09:31 AM, Ján Tomko wrote: >> > On Thu, Apr 12, 2018 at 07:49:15PM +, Clementine Hayat wrote: >> >> Add a function named virDomainObjCheckIsActive

Re: [libvirt] [PATCH] Add function that raises error if domain is not active

2018-04-13 Thread Jiri Denemark
On Thu, Apr 12, 2018 at 19:49:15 +, Clementine Hayat wrote: > Add a function named virDomainObjCheckIsActive in src/conf/domain_conf.c. > It calls virDomainObjIsActive, raises error and returns. > > There is a lot of occurence of this pattern and it will save 3 lines on > each call. Knowing

Re: [libvirt] [PATCH] Add function that raises error if domain is not active

2018-04-13 Thread Erik Skultety
On Fri, Apr 13, 2018 at 09:45:48AM +0200, Michal Privoznik wrote: > On 04/13/2018 09:31 AM, Ján Tomko wrote: > > On Thu, Apr 12, 2018 at 07:49:15PM +, Clementine Hayat wrote: > >> Add a function named virDomainObjCheckIsActive in src/conf/domain_conf.c. > >> It calls virDomainObjIsActive,

Re: [libvirt] [PATCH] Add function that raises error if domain is not active

2018-04-13 Thread Michal Privoznik
On 04/13/2018 09:31 AM, Ján Tomko wrote: > On Thu, Apr 12, 2018 at 07:49:15PM +, Clementine Hayat wrote: >> Add a function named virDomainObjCheckIsActive in src/conf/domain_conf.c. >> It calls virDomainObjIsActive, raises error and returns. > > *raises error if necessary > >> >> There is a

Re: [libvirt] [PATCH] Add function that raises error if domain is not active

2018-04-13 Thread Ján Tomko
On Thu, Apr 12, 2018 at 07:49:15PM +, Clementine Hayat wrote: Add a function named virDomainObjCheckIsActive in src/conf/domain_conf.c. It calls virDomainObjIsActive, raises error and returns. *raises error if necessary There is a lot of occurence of this pattern and it will save 3

[libvirt] [PATCH] Add function that raises error if domain is not active

2018-04-12 Thread Clementine Hayat
Add a function named virDomainObjCheckIsActive in src/conf/domain_conf.c. It calls virDomainObjIsActive, raises error and returns. There is a lot of occurence of this pattern and it will save 3 lines on each call. Knowing that there is over 100 occurences, it will remove 300 lines from the code