/* parse utilname */
p = term_start ? term_start : type_start;
- *name = str;
- *namesz = p - str - 1;
+ *name = str;
+ *namesz = p - str - 1;
return 0;
}
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);
* @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:
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(
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(
goto done;
}
- words= cmdline;
+ words = cmdline;
dir = opendir("/dev");
if (!dir)
goto done;
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,
} 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;