From: Paul Menzel <paulepanter@users.sourceforge.net>
To: alsa-devel@alsa-project.org
Cc: Elimar Riesebieter <riesebie@lxtec.de>
Subject: [PATCH] alsactl: Fix spelling mistakes
Date: Tue, 27 Dec 2016 17:04:43 +0100 [thread overview]
Message-ID: <1482854683.3916.202.camel@users.sourceforge.net> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 5339 bytes --]
Date: Sun, 8 May 2016 16:50:23 +0000
Upstream the patch from the Debian package [1].
[1] https://sources.debian.net/src/alsa-utils/1.1.2-1/debian/patches/spellfixes.patch/
CC: Elimar Riesebieter <riesebie@lxtec.de>
Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
---
The renaming from `ressize` to `resize` might not be correct, if it’s
the size of the variable *res*. Please tell me, if I should remove
that.
alsactl/alsactl.c | 2 +-
alsactl/init_parse.c | 10 +++++-----
alsactl/init_utils_run.c | 14 +++++++-------
alsactl/state.c | 2 +-
4 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/alsactl/alsactl.c b/alsactl/alsactl.c
index bcbc187..f0060e9 100644
--- a/alsactl/alsactl.c
+++ b/alsactl/alsactl.c
@@ -90,7 +90,7 @@ static struct arg args[] = {
{ FILEARG | 'e', "pid-file", "pathname for the process id (daemon mode)" },
{ HEADER, NULL, "Available init options:" },
{ ENVARG | 'E', "env", "set environment variable for init phase (NAME=VALUE)" },
-{ FILEARG | 'i', "initfile", "main configuation file for init phase" },
+{ FILEARG | 'i', "initfile", "main configuration file for init phase" },
{ 0, NULL, " (default " DATADIR "/init/00main)" },
{ 'b', "background", "run daemon in background" },
{ 's', "syslog", "use syslog for messages" },
diff --git a/alsactl/init_parse.c b/alsactl/init_parse.c
index e81174f..f2a598c 100644
--- a/alsactl/init_parse.c
+++ b/alsactl/init_parse.c
@@ -939,7 +939,7 @@ static int get_key(char **line, char **key, enum key_op *op, char **value)
}
/* extract possible KEY{attr} */
-static char *get_key_attribute(struct space *space, char *str, char *res, size_t ressize)
+static char *get_key_attribute(struct space *space, char *str, char *res, size_t resize)
{
char *pos;
char *attr;
@@ -953,7 +953,7 @@ static char *get_key_attribute(struct space *space, char *str, char *res, size_t
return NULL;
}
pos[0] = '\0';
- strlcpy(res, attr, ressize);
+ strlcpy(res, attr, resize);
pos[0] = '}';
dbg("attribute='%s'", res);
return res;
@@ -1209,7 +1209,7 @@ found:
/* possibly truncate to format-char specified length */
if (len != -1) {
head[len] = '\0';
- dbg("truncate to %i chars, subtitution string becomes '%s'", len, head);
+ dbg("truncate to %i chars, substitution string becomes '%s'", len, head);
}
strlcat(string, temp, maxsize);
}
@@ -1242,7 +1242,7 @@ found:
static
int run_program1(struct space *space,
const char *command0, char *result,
- size_t ressize, size_t *reslen, int log)
+ size_t resize, size_t *reslen, int log)
{
if (strncmp(command0, "__ctl_search", 12) == 0) {
const char *res = elemid_get(space, "do_search");
@@ -1254,7 +1254,7 @@ int run_program1(struct space *space,
const char *res = elemid_get(space, "do_count");
if (res == NULL || strcmp(res, "0") == 0)
return EXIT_FAILURE;
- strlcpy(result, res, ressize);
+ strlcpy(result, res, resize);
return EXIT_SUCCESS;
}
Perror(space, "unknown buildin command '%s'", command0);
diff --git a/alsactl/init_utils_run.c b/alsactl/init_utils_run.c
index dde490b..ffa0e23 100644
--- a/alsactl/init_utils_run.c
+++ b/alsactl/init_utils_run.c
@@ -24,12 +24,12 @@
static
int run_program1(struct space *space,
const char *command0, char *result,
- size_t ressize, size_t *reslen, int log);
+ size_t resize, size_t *reslen, int log);
static
int run_program0(struct space *space,
const char *command0, char *result,
- size_t ressize, size_t *reslen, int log)
+ size_t resize, size_t *reslen, int log)
{
int retval = 0;
int status;
@@ -175,11 +175,11 @@ int run_program0(struct space *space,
/* store result for rule processing */
if (result) {
- if (respos + count < ressize) {
+ if (respos + count < resize) {
memcpy(&result[respos], inbuf, count);
respos += count;
} else {
- Perror(space, "ressize %ld too short", (long)ressize);
+ Perror(space, "resize %ld too short", (long)resize);
retval = -1;
}
}
@@ -239,9 +239,9 @@ int run_program0(struct space *space,
static
int run_program(struct space *space, const char *command0, char *result,
- size_t ressize, size_t *reslen, int log)
+ size_t resize, size_t *reslen, int log)
{
if (command0[0] == '_' && command0[1] == '_')
- return run_program1(space, command0, result, ressize, reslen, log);
- return run_program0(space, command0, result, ressize, reslen, log);
+ return run_program1(space, command0, result, resize, reslen, log);
+ return run_program0(space, command0, result, resize, reslen, log);
}
diff --git a/alsactl/state.c b/alsactl/state.c
index 3908ec4..d2d6dac 100644
--- a/alsactl/state.c
+++ b/alsactl/state.c
@@ -1160,7 +1160,7 @@ static int restore_config_value(snd_ctl_t *handle, snd_ctl_elem_info_t *info,
case SND_CTL_ELEM_TYPE_IEC958:
break;
default:
- cerror(doit, "Unknow control type: %d", type);
+ cerror(doit, "Unknown control type: %d", type);
return -EINVAL;
}
return 0;
--
2.11.0
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
next reply other threads:[~2016-12-27 16:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-27 16:04 Paul Menzel [this message]
2016-12-27 20:57 ` [PATCH] alsactl: Fix spelling mistakes Clemens Ladisch
2016-12-28 16:02 ` Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1482854683.3916.202.camel@users.sourceforge.net \
--to=paulepanter@users.sourceforge.net \
--cc=alsa-devel@alsa-project.org \
--cc=riesebie@lxtec.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.