[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-trivial] [PATCH 3/4] pidfile: stop making pidfile error a spec
From: |
Gonglei |
Subject: |
Re: [Qemu-trivial] [PATCH 3/4] pidfile: stop making pidfile error a special case |
Date: |
Fri, 31 Oct 2014 16:10:22 +0800 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 |
On 2014/10/31 16:02, Michael Tokarev wrote:
> 31.10.2014 10:58, Gonglei wrote:
>> On 2014/10/31 15:41, Michael Tokarev wrote:
> []
>>>>>>> + exit(len == 1 && status == 0 ? 0 : 1);
>>>>>
>>>>> ...it is checked here, note the 'len == 1' part of the condition.
>>>>
>>>> If len != 1, the original code exit with 1, after your changes,
>>>> it will exit with 0. Right?
>>>
>>> with len != 1, the condition 'len == 1 && status == 0 ? 0 : 1'
>>
>> Ok. That's will be great if you can modify it
>> to "(len == 1 && status == 0 ) ? 0 : 1"
>
> Well, ? operator has lowest precedence in C, && and || is higher,
> and == is even higher. That's the basic rules of the language.
> So I don't really see why... ;)
>
> The comment however should clear all confusion, hopefully.
>
Hmm...
BTW, Do you receive mails subscribed form Qemu community?
Does the Qemu maillist system crash?
Since yesterday evening, my colleagues and I do not received mails.
It's too weird!
Thanks!
-Gonglei
- [Qemu-trivial] [PATCH 0/4] cleanup -daemonize and pidfile creation a bit, Michael Tokarev, 2014/10/31
- [Qemu-trivial] [PATCH 3/4] pidfile: stop making pidfile error a special case, Michael Tokarev, 2014/10/31
- Re: [Qemu-trivial] [PATCH 3/4] pidfile: stop making pidfile error a special case, Gonglei, 2014/10/31
- Re: [Qemu-trivial] [PATCH 3/4] pidfile: stop making pidfile error a special case, Michael Tokarev, 2014/10/31
- Re: [Qemu-trivial] [PATCH 3/4] pidfile: stop making pidfile error a special case, Gonglei, 2014/10/31
- Re: [Qemu-trivial] [PATCH 3/4] pidfile: stop making pidfile error a special case, Michael Tokarev, 2014/10/31
- Re: [Qemu-trivial] [PATCH 3/4] pidfile: stop making pidfile error a special case, Gonglei, 2014/10/31
- Re: [Qemu-trivial] [PATCH 3/4] pidfile: stop making pidfile error a special case, Michael Tokarev, 2014/10/31
- Re: [Qemu-trivial] [PATCH 3/4] pidfile: stop making pidfile error a special case,
Gonglei <=
[Qemu-trivial] [PATCH 1/4] os-posix: use global daemon_pipe instead of cryptic fds[1], Michael Tokarev, 2014/10/31
[Qemu-trivial] [PATCH 4/4] os-posix: reorder parent notification for -daemonize, Michael Tokarev, 2014/10/31
[Qemu-trivial] [PATCH 2/4] os-posix: replace goto again with a proper loop, Michael Tokarev, 2014/10/31