(!x || (x && y)) is the same as (!x || y)
https://bugzilla.gnome.org/show_bug.cgi?id=796847
underscore = strchr (str, '_');
str = strchr (str + 1, '%');
- if (str && (!underscore || (underscore && str < underscore))) {
+ if (str && (!underscore || str < underscore)) {
g_warning
("invalid name template %s: each of conversion specifications "
"must be separated by an underscore", name);
in_quotes = FALSE;
while (*str) {
- if (*str == '"' && (!in_quotes || (in_quotes && *(str - 1) != '\\')))
+ if (*str == '"' && (!in_quotes || *(str - 1) != '\\'))
in_quotes = !in_quotes;
if (*str == ' ' && !in_quotes)
/* make sure we don't read beyond the end of the string */
if (*walk == '\0')
break;
- } else if (*walk == '"' && (!in_quotes || (in_quotes
- && (*(walk - 1) != '\\')))) {
+ } else if (*walk == '"' && (!in_quotes || *(walk - 1) != '\\')) {
/* don't unescape inside quotes and don't switch
* state with escaped quoted inside quotes */
in_quotes = !in_quotes;