[PATCH v2] libmount: fix typos

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
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: signature.asc
Description: PGP signature


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux