[PATCH] speakup: i18n: modify incorrect comments

bajing posted 1 patch 1 year, 5 months ago
drivers/accessibility/speakup/i18n.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] speakup: i18n: modify incorrect comments
Posted by bajing 1 year, 5 months ago
Regarding the text part, the comment was written incorrectly, so it needs to be modified.

Signed-off-by: bajing <bajing@cmss.chinamobile.com>
---
 drivers/accessibility/speakup/i18n.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/accessibility/speakup/i18n.c b/drivers/accessibility/speakup/i18n.c
index d62079b1661f..10c7cdc685f7 100644
--- a/drivers/accessibility/speakup/i18n.c
+++ b/drivers/accessibility/speakup/i18n.c
@@ -541,7 +541,7 @@ static bool fmt_validate(char *template, char *user)
  * If the function fails, then user_messages is untouched.
  * Arguments:
  * - index: a message number, as found in i18n.h.
- * - text:  text of message.  Not NUL-terminated.
+ * - text:  text of message.  Not NULL-terminated.
  * - length: number of bytes in text.
  * Failure conditions:
  * -EINVAL -  Invalid format specifiers in formatted message or illegal index.
-- 
2.33.0
Re: [PATCH] speakup: i18n: modify incorrect comments
Posted by Samuel Thibault 1 year, 5 months ago
bajing, le mer. 14 août 2024 11:00:17 +0800, a ecrit:
> Regarding the text part, the comment was written incorrectly, so it needs to be modified.
> 
> Signed-off-by: bajing <bajing@cmss.chinamobile.com>
> ---
>  drivers/accessibility/speakup/i18n.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/accessibility/speakup/i18n.c b/drivers/accessibility/speakup/i18n.c
> index d62079b1661f..10c7cdc685f7 100644
> --- a/drivers/accessibility/speakup/i18n.c
> +++ b/drivers/accessibility/speakup/i18n.c
> @@ -541,7 +541,7 @@ static bool fmt_validate(char *template, char *user)
>   * If the function fails, then user_messages is untouched.
>   * Arguments:
>   * - index: a message number, as found in i18n.h.
> - * - text:  text of message.  Not NUL-terminated.
> + * - text:  text of message.  Not NULL-terminated.

? Man ascii says it's called NUL, not NULL. We don't want people to
confuse it with the NULL pointer anyway, so no, we don't to change this.

Samuel

>   * - length: number of bytes in text.
>   * Failure conditions:
>   * -EINVAL -  Invalid format specifiers in formatted message or illegal index.
> -- 
> 2.33.0