Re: cmd: Use NUL/0 instead of 0x00
Frédéric Delanoy <frederic.delanoy(a)gmail.com> writes:
@@ -374,7 +374,7 @@ void WCMD_HandleTildaModifiers(WCHAR **start, const WCHAR *forVariable, points to the variable just after the modifiers. Process modifiers in a specific order, remembering there could be duplicates */ modifierLen = lastModifier - firstModifier; - finaloutput[0] = 0x00; + finaloutput[0] = '\0';
It's mostly a matter of taste, but I don't think '\0' is better than 0x00, it's just another complicated way of writing 0. -- Alexandre Julliard julliard(a)winehq.org
2011/9/13 Alexandre Julliard <julliard(a)winehq.org>:
Frédéric Delanoy <frederic.delanoy(a)gmail.com> writes:
@@ -374,7 +374,7 @@ void WCMD_HandleTildaModifiers(WCHAR **start, const WCHAR *forVariable, points to the variable just after the modifiers. Process modifiers in a specific order, remembering there could be duplicates */ modifierLen = lastModifier - firstModifier; - finaloutput[0] = 0x00; + finaloutput[0] = '\0';
It's mostly a matter of taste, but I don't think '\0' is better than 0x00, it's just another complicated way of writing 0.
Well IMHO '\0' clearly indicates a char value, while 0 could be an integer (not in this obvioius example of course). This way you've a visual indicator/differentiator with nearby integer values assignments like "foo_integer_var = 0", and this could make the code more readable IMO
Frédéric Delanoy <frederic.delanoy(a)gmail.com> writes:
Well IMHO '\0' clearly indicates a char value, while 0 could be an integer (not in this obvioius example of course). This way you've a visual indicator/differentiator with nearby integer values assignments like "foo_integer_var = 0", and this could make the code more readable IMO
They both mean the same thing, and I don't think the extra line noise makes it more readable. But like I said, it's a matter of taste, and you can use the way you prefer in your own code; the corollary is that you can't change it in other people's code. -- Alexandre Julliard julliard(a)winehq.org
participants (2)
-
Alexandre Julliard -
Frédéric Delanoy