From: наб Date: Thu, 31 Mar 2022 16:55:35 +0000 (+0200) Subject: libmount: fix typos X-Git-Tag: v2.39-rc1~739 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a938f9f0c26cc1a7acb3afc608b00207379889a2;p=thirdparty%2Futil-linux.git libmount: fix typos --- diff --git a/lib/colors.c b/lib/colors.c index e317519124..c4bc08d0fc 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 55502238d7..c63cca25dc 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 5daa511a0c..43b983ebbc 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 74815055b0..ff3acfb559 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 facb1ffbbd..9ae4b2ebae 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 8de512286f..de07756209 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;