staging: speakup: i18n.c: style fixes
Clean up this file based on reports from checkpatch.pl. Signed-off-by: William Hubbs <w.d.hubbs@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
29644b22da
commit
d09d3e2cdd
|
@ -411,9 +411,10 @@ static char *next_specifier(char *input)
|
||||||
while ((next_percent != NULL) && !found) {
|
while ((next_percent != NULL) && !found) {
|
||||||
next_percent = strchr(next_percent, '%');
|
next_percent = strchr(next_percent, '%');
|
||||||
if (next_percent != NULL) {
|
if (next_percent != NULL) {
|
||||||
|
/* skip over doubled percent signs */
|
||||||
while ((next_percent[0] == '%')
|
while ((next_percent[0] == '%')
|
||||||
&& (next_percent[1] == '%'))
|
&& (next_percent[1] == '%'))
|
||||||
next_percent += 2; /* Advance over doubled percent signs. */
|
next_percent += 2;
|
||||||
if (*next_percent == '%')
|
if (*next_percent == '%')
|
||||||
found = 1;
|
found = 1;
|
||||||
else if (*next_percent == '\0')
|
else if (*next_percent == '\0')
|
||||||
|
@ -515,10 +516,11 @@ static int fmt_validate(char *template, char *user)
|
||||||
/* Both have at least one more specifier. */
|
/* Both have at least one more specifier. */
|
||||||
valid = compare_specifiers(&template_ptr, &user_ptr);
|
valid = compare_specifiers(&template_ptr, &user_ptr);
|
||||||
} else {
|
} else {
|
||||||
/* No more format specifiers in one or both of the strings. */
|
/* No more format specifiers in one or both strings. */
|
||||||
still_comparing = 0;
|
still_comparing = 0;
|
||||||
|
/* See if one has more specifiers than the other. */
|
||||||
if (template_ptr || user_ptr)
|
if (template_ptr || user_ptr)
|
||||||
valid = 0; /* One has more specifiers than the other. */
|
valid = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return valid;
|
return valid;
|
||||||
|
@ -602,7 +604,8 @@ void reset_msg_group(struct msg_group_t *group)
|
||||||
/* Called at initialization time, to establish default messages. */
|
/* Called at initialization time, to establish default messages. */
|
||||||
void initialize_msgs(void)
|
void initialize_msgs(void)
|
||||||
{
|
{
|
||||||
memcpy(speakup_msgs, speakup_default_msgs, sizeof(speakup_default_msgs));
|
memcpy(speakup_msgs, speakup_default_msgs,
|
||||||
|
sizeof(speakup_default_msgs));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Free user-supplied strings when module is unloaded: */
|
/* Free user-supplied strings when module is unloaded: */
|
||||||
|
|
Loading…
Reference in New Issue