util-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] libmount: fix typos
@ 2022-03-30 17:43 наб
  2022-03-31  8:08 ` Anatoly Pugachev
  0 siblings, 1 reply; 4+ messages in thread
From: наб @ 2022-03-30 17:43 UTC (permalink / raw)
  To: util-linux

[-- Attachment #1: Type: text/plain, Size: 1325 bytes --]

---
Please keep me in CC, as I'm not subscribed

 libmount/src/optstr.c | 2 +-
 libmount/src/utils.c  | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/libmount/src/optstr.c b/libmount/src/optstr.c
index 5daa511a0..43b983ebb 100644
--- a/libmount/src/optstr.c
+++ b/libmount/src/optstr.c
@@ -887,7 +887,7 @@ static int set_uint_value(char **optstr, unsigned int num,
  * @value: pointer to the beginning of the uid value
  * @valsz: size of the value
  * @next: returns pointer to the next option (optional argument)
-
+ *
  * Translates "username" or "useruid" to the real UID.
  *
  * For example:
diff --git a/libmount/src/utils.c b/libmount/src/utils.c
index 74815055b..ff3acfb55 100644
--- a/libmount/src/utils.c
+++ b/libmount/src/utils.c
@@ -596,7 +596,7 @@ int mnt_get_uid(const char *username, uid_t *uid)
 		return -ENOMEM;
 
 	if (!getpwnam_r(username, &pwd, buf, UL_GETPW_BUFSIZ, &pw) && pw) {
-		*uid= pw->pw_uid;
+		*uid = pw->pw_uid;
 		rc = 0;
 	} else {
 		DBG(UTILS, ul_debug(
@@ -623,7 +623,7 @@ int mnt_get_gid(const char *groupname, gid_t *gid)
 		return -ENOMEM;
 
 	if (!getgrnam_r(groupname, &grp, buf, UL_GETPW_BUFSIZ, &gr) && gr) {
-		*gid= gr->gr_gid;
+		*gid = gr->gr_gid;
 		rc = 0;
 	} else {
 		DBG(UTILS, ul_debug(
-- 
2.30.2

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] libmount: fix typos
  2022-03-30 17:43 [PATCH] libmount: fix typos наб
@ 2022-03-31  8:08 ` Anatoly Pugachev
  2022-03-31 16:55   ` [PATCH v2] " наб
  0 siblings, 1 reply; 4+ messages in thread
From: Anatoly Pugachev @ 2022-03-31  8:08 UTC (permalink / raw)
  To: наб; +Cc: util-linux

> -               *uid= pw->pw_uid;
> +               *uid = pw->pw_uid;


you could probably patch as well:

./lib/idcache.c
./lib/colors.c
./login-utils/sulogin-consoles.c
./misc-utils/lsfd-filter.c
./sys-utils/dmesg.c

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v2] libmount: fix typos
  2022-03-31  8:08 ` Anatoly Pugachev
@ 2022-03-31 16:55   ` наб
  2022-04-01  8:25     ` Karel Zak
  0 siblings, 1 reply; 4+ messages in thread
From: наб @ 2022-03-31 16:55 UTC (permalink / raw)
  To: Anatoly Pugachev; +Cc: util-linux

[-- Attachment #1: Type: text/plain, Size: 3966 bytes --]

---
Few more pointed out by Anatoly

Please keep me in CC, as I'm not subscribed

 lib/colors.c                   |  4 ++--
 lib/idcache.c                  |  2 +-
 libmount/src/optstr.c          |  2 +-
 libmount/src/utils.c           |  4 ++--
 login-utils/sulogin-consoles.c |  2 +-
 misc-utils/lsfd-filter.c       | 10 +++++-----
 6 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/lib/colors.c b/lib/colors.c
index e31751912..c4bc08d0f 100644
--- a/lib/colors.c
+++ b/lib/colors.c
@@ -230,8 +230,8 @@ static int filename_to_tokens(const char *str,
 
 	/* parse utilname */
 	p = term_start ? term_start : type_start;
-	*name =  str;
-	*namesz	= p - str - 1;
+	*name = str;
+	*namesz = p - str - 1;
 
 	return 0;
 }
diff --git a/lib/idcache.c b/lib/idcache.c
index 55502238d..c63cca25d 100644
--- a/lib/idcache.c
+++ b/lib/idcache.c
@@ -97,7 +97,7 @@ static void add_id(struct idcache *ic, char *name, unsigned long int id)
 
 void add_uid(struct idcache *cache, unsigned long int id)
 {
-	struct identry *ent= get_id(cache, id);
+	struct identry *ent = get_id(cache, id);
 
 	if (!ent) {
 		struct passwd *pw = getpwuid((uid_t) id);
diff --git a/libmount/src/optstr.c b/libmount/src/optstr.c
index 5daa511a0..43b983ebb 100644
--- a/libmount/src/optstr.c
+++ b/libmount/src/optstr.c
@@ -887,7 +887,7 @@ static int set_uint_value(char **optstr, unsigned int num,
  * @value: pointer to the beginning of the uid value
  * @valsz: size of the value
  * @next: returns pointer to the next option (optional argument)
-
+ *
  * Translates "username" or "useruid" to the real UID.
  *
  * For example:
diff --git a/libmount/src/utils.c b/libmount/src/utils.c
index 74815055b..ff3acfb55 100644
--- a/libmount/src/utils.c
+++ b/libmount/src/utils.c
@@ -596,7 +596,7 @@ int mnt_get_uid(const char *username, uid_t *uid)
 		return -ENOMEM;
 
 	if (!getpwnam_r(username, &pwd, buf, UL_GETPW_BUFSIZ, &pw) && pw) {
-		*uid= pw->pw_uid;
+		*uid = pw->pw_uid;
 		rc = 0;
 	} else {
 		DBG(UTILS, ul_debug(
@@ -623,7 +623,7 @@ int mnt_get_gid(const char *groupname, gid_t *gid)
 		return -ENOMEM;
 
 	if (!getgrnam_r(groupname, &grp, buf, UL_GETPW_BUFSIZ, &gr) && gr) {
-		*gid= gr->gr_gid;
+		*gid = gr->gr_gid;
 		rc = 0;
 	} else {
 		DBG(UTILS, ul_debug(
diff --git a/login-utils/sulogin-consoles.c b/login-utils/sulogin-consoles.c
index facb1ffbb..9ae4b2eba 100644
--- a/login-utils/sulogin-consoles.c
+++ b/login-utils/sulogin-consoles.c
@@ -475,7 +475,7 @@ static int detect_consoles_from_cmdline(struct list_head *consoles)
 		goto done;
 	}
 
-	words= cmdline;
+	words = cmdline;
 	dir = opendir("/dev");
 	if (!dir)
 		goto done;
diff --git a/misc-utils/lsfd-filter.c b/misc-utils/lsfd-filter.c
index 8de512286..de0775620 100644
--- a/misc-utils/lsfd-filter.c
+++ b/misc-utils/lsfd-filter.c
@@ -573,7 +573,7 @@ static struct token *parser_read(struct parser *parser)
 		c0 = parser_getc(parser);
 		if (c0 == '|') {
 			t->type = TOKEN_OP2;
-			t->val.op2= OP2_OR;
+			t->val.op2 = OP2_OR;
 			break;
 		}
 		snprintf(parser->errmsg, ERRMSG_LEN,
@@ -597,19 +597,19 @@ static struct token *parser_read(struct parser *parser)
 			} else if (strcmp(t->val.str, "or") == 0) {
 				free(t->val.str);
 				t->type = TOKEN_OP2;
-				t->val.op2= OP2_OR;
+				t->val.op2 = OP2_OR;
 			} else if (strcmp(t->val.str, "and") == 0) {
 				free(t->val.str);
 				t->type = TOKEN_OP2;
-				t->val.op2= OP2_AND;
+				t->val.op2 = OP2_AND;
 			} else if (strcmp(t->val.str, "eq") == 0) {
 				free(t->val.str);
 				t->type = TOKEN_OP2;
-				t->val.op2= OP2_EQ;
+				t->val.op2 = OP2_EQ;
 			} else if (strcmp(t->val.str, "ne") == 0) {
 				free(t->val.str);
 				t->type = TOKEN_OP2;
-				t->val.op2= OP2_NE;
+				t->val.op2 = OP2_NE;
 			} else if (strcmp(t->val.str, "lt") == 0) {
 				free(t->val.str);
 				t->type = TOKEN_OP2;
-- 
2.30.2

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] libmount: fix typos
  2022-03-31 16:55   ` [PATCH v2] " наб
@ 2022-04-01  8:25     ` Karel Zak
  0 siblings, 0 replies; 4+ messages in thread
From: Karel Zak @ 2022-04-01  8:25 UTC (permalink / raw)
  To: наб; +Cc: Anatoly Pugachev, util-linux

On Thu, Mar 31, 2022 at 06:55:35PM +0200, наб wrote:
>  lib/colors.c                   |  4 ++--
>  lib/idcache.c                  |  2 +-
>  libmount/src/optstr.c          |  2 +-
>  libmount/src/utils.c           |  4 ++--
>  login-utils/sulogin-consoles.c |  2 +-
>  misc-utils/lsfd-filter.c       | 10 +++++-----
>  6 files changed, 12 insertions(+), 12 deletions(-)

Applied, thanks.

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-04-01  8:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-30 17:43 [PATCH] libmount: fix typos наб
2022-03-31  8:08 ` Anatoly Pugachev
2022-03-31 16:55   ` [PATCH v2] " наб
2022-04-01  8:25     ` Karel Zak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).