[alsa-devel] [PATCH] alsactl: Fix spelling mistakes
Paul Menzel
paulepanter at users.sourceforge.net
Tue Dec 27 17:04:43 CET 2016
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 at lxtec.de>
Signed-off-by: Paul Menzel <paulepanter at 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20161227/317e339a/attachment.sig>
More information about the Alsa-devel
mailing list