mirror of
https://github.com/troglobit/finit.git
synced 2026-11-06 15:51:03 +00:00
Rename local variable shadowing variable in outer scope
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
e72b61c9c9
commit
97ce0aa519
3 files changed
+9
-9
No files matched your search
+5
-5
@@ -49,8 +49,8 @@ const char *condstr(enum cond_state s)
|
|||||||
|
|
||||||
const char *cond_path(const char *name)
|
const char *cond_path(const char *name)
|
||||||
{
|
{
|
||||||
char tmp[MAX_ARG_LEN];
|
|
||||||
static char path[256];
|
static char path[256];
|
||||||
|
char tmp[MAX_ARG_LEN];
|
||||||
|
|
||||||
snprintf(tmp, sizeof(tmp), COND_PATH "/%s", name);
|
snprintf(tmp, sizeof(tmp), COND_PATH "/%s", name);
|
||||||
|
|
||||||
@@ -59,8 +59,8 @@ const char *cond_path(const char *name)
|
|||||||
|
|
||||||
unsigned int cond_get_gen(const char *file)
|
unsigned int cond_get_gen(const char *file)
|
||||||
{
|
{
|
||||||
char *ptr, path[256];
|
|
||||||
unsigned int gen;
|
unsigned int gen;
|
||||||
|
char *ptr, path[256];
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
@@ -99,9 +99,9 @@ enum cond_state cond_get(const char *name)
|
|||||||
|
|
||||||
enum cond_state cond_get_agg(const char *names)
|
enum cond_state cond_get_agg(const char *names)
|
||||||
{
|
{
|
||||||
char *cond;
|
|
||||||
enum cond_state s = COND_ON;
|
|
||||||
static char conds[MAX_COND_LEN];
|
static char conds[MAX_COND_LEN];
|
||||||
|
enum cond_state s = COND_ON;
|
||||||
|
char *cond;
|
||||||
|
|
||||||
if (!names)
|
if (!names)
|
||||||
return COND_ON;
|
return COND_ON;
|
||||||
@@ -115,8 +115,8 @@ enum cond_state cond_get_agg(const char *names)
|
|||||||
|
|
||||||
int cond_affects(const char *name, const char *names)
|
int cond_affects(const char *name, const char *names)
|
||||||
{
|
{
|
||||||
char *cond;
|
|
||||||
static char conds[MAX_COND_LEN];
|
static char conds[MAX_COND_LEN];
|
||||||
|
char *cond;
|
||||||
|
|
||||||
if (!name || !names)
|
if (!name || !names)
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -95,8 +95,8 @@ char *pid_get_name(pid_t pid, char *name, size_t len)
|
|||||||
|
|
||||||
char *pid_file(svc_t *svc)
|
char *pid_file(svc_t *svc)
|
||||||
{
|
{
|
||||||
char fn[MAX_ARG_LEN];
|
|
||||||
static char path[256];
|
static char path[256];
|
||||||
|
char fn[MAX_ARG_LEN];
|
||||||
|
|
||||||
if (svc->pidfile[0]) {
|
if (svc->pidfile[0]) {
|
||||||
if (svc->pidfile[0] == '!')
|
if (svc->pidfile[0] == '!')
|
||||||
|
|||||||
+3
-3
@@ -1351,10 +1351,10 @@ restart:
|
|||||||
svc_set_state(svc, SVC_RUNNING_STATE);
|
svc_set_state(svc, SVC_RUNNING_STATE);
|
||||||
/* Reassert condition if we go from waiting and no change */
|
/* Reassert condition if we go from waiting and no change */
|
||||||
if (!svc_is_changed(svc)) {
|
if (!svc_is_changed(svc)) {
|
||||||
char cond[MAX_COND_LEN];
|
char name[MAX_COND_LEN];
|
||||||
|
|
||||||
mkcond(cond, sizeof(cond), svc->cmd);
|
mkcond(name, sizeof(name), svc->cmd);
|
||||||
cond_set_path(cond_path(cond), COND_ON);
|
cond_set_path(cond_path(name), COND_ON);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user