mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
logging: Change return type of virLogDaemonConfigFilePat to void
This function return value is invariant since 18f3771
, so change
its type and remove all dependent checks.
Found by Linux Verification Center (linuxtesting.org) with Svace.
Reported-by: Pavel Nekrasov <p.nekrasov@fobos-nt.ru>
Signed-off-by: Alexander Kuznetsov <kuznetsovam@altlinux.org>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
parent
0e1a848733
commit
99474f8e50
@ -692,14 +692,10 @@ int main(int argc, char **argv) {
|
|||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* No explicit config, so try and find a default one */
|
/* No explicit config, so find a default one */
|
||||||
if (remote_config_file == NULL) {
|
if (remote_config_file == NULL) {
|
||||||
implicit_conf = true;
|
implicit_conf = true;
|
||||||
if (virLogDaemonConfigFilePath(privileged,
|
virLogDaemonConfigFilePath(privileged, &remote_config_file);
|
||||||
&remote_config_file) < 0) {
|
|
||||||
VIR_ERROR(_("Can't determine config path"));
|
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Read the config file if it exists */
|
/* Read the config file if it exists */
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
VIR_LOG_INIT("logging.log_daemon_config");
|
VIR_LOG_INIT("logging.log_daemon_config");
|
||||||
|
|
||||||
|
|
||||||
int
|
void
|
||||||
virLogDaemonConfigFilePath(bool privileged, char **configfile)
|
virLogDaemonConfigFilePath(bool privileged, char **configfile)
|
||||||
{
|
{
|
||||||
if (privileged) {
|
if (privileged) {
|
||||||
@ -45,8 +45,6 @@ virLogDaemonConfigFilePath(bool privileged, char **configfile)
|
|||||||
|
|
||||||
*configfile = g_strdup_printf("%s/virtlogd.conf", configdir);
|
*configfile = g_strdup_printf("%s/virtlogd.conf", configdir);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ struct _virLogDaemonConfig {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
int virLogDaemonConfigFilePath(bool privileged, char **configfile);
|
void virLogDaemonConfigFilePath(bool privileged, char **configfile);
|
||||||
virLogDaemonConfig *virLogDaemonConfigNew(bool privileged);
|
virLogDaemonConfig *virLogDaemonConfigNew(bool privileged);
|
||||||
void virLogDaemonConfigFree(virLogDaemonConfig *data);
|
void virLogDaemonConfigFree(virLogDaemonConfig *data);
|
||||||
int virLogDaemonConfigLoadFile(virLogDaemonConfig *data,
|
int virLogDaemonConfigLoadFile(virLogDaemonConfig *data,
|
||||||
|
Loading…
Reference in New Issue
Block a user