mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-01 04:41:14 -03:00
Additional miscellaneous fixes based on cppcheck static analysis
This commit is contained in:
@@ -426,8 +426,6 @@ void env_universal_barrier()
|
||||
|
||||
void env_universal_set(const wcstring &name, const wcstring &value, bool exportv)
|
||||
{
|
||||
message_t *msg;
|
||||
|
||||
if (!s_env_univeral_inited)
|
||||
return;
|
||||
|
||||
@@ -439,7 +437,7 @@ void env_universal_set(const wcstring &name, const wcstring &value, bool exportv
|
||||
}
|
||||
else
|
||||
{
|
||||
msg = create_message(exportv?SET_EXPORT:SET,
|
||||
message_t *msg = create_message(exportv?SET_EXPORT:SET,
|
||||
name.c_str(),
|
||||
value.c_str());
|
||||
|
||||
@@ -459,7 +457,6 @@ int env_universal_remove(const wchar_t *name)
|
||||
{
|
||||
int res;
|
||||
|
||||
message_t *msg;
|
||||
if (!s_env_univeral_inited)
|
||||
return 1;
|
||||
|
||||
@@ -476,7 +473,7 @@ int env_universal_remove(const wchar_t *name)
|
||||
}
|
||||
else
|
||||
{
|
||||
msg= create_message(ERASE, name, 0);
|
||||
message_t *msg = create_message(ERASE, name, 0);
|
||||
msg->count=1;
|
||||
env_universal_server.unsent.push(msg);
|
||||
env_universal_barrier();
|
||||
|
||||
Reference in New Issue
Block a user