mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-21 20:15:17 +00:00
qemud/qemud.c (qemudInitPaths): Remove unused code.
This commit is contained in:
parent
efd495d667
commit
7ff9eebeba
@ -1,3 +1,7 @@
|
||||
Thu Dec 6 12:41:18 CET 2007 Jim Meyering <meyering@redhat.com>
|
||||
|
||||
* qemud/qemud.c (qemudInitPaths): Remove unused code.
|
||||
|
||||
Thu Dec 6 16:32:00 UTC 2007 Richard W.M. Jones <rjones@redhat.com>
|
||||
|
||||
* src/virsh.c: The prompt should depend on readonly status,
|
||||
|
@ -659,10 +659,8 @@ static int qemudInitPaths(struct qemud_server *server,
|
||||
char *sockname,
|
||||
char *roSockname,
|
||||
int maxlen) {
|
||||
char *base = 0;
|
||||
uid_t uid = geteuid();
|
||||
|
||||
|
||||
if (!uid) {
|
||||
if (snprintf (sockname, maxlen, "%s/run/libvirt/libvirt-sock",
|
||||
LOCAL_STATE_DIR) >= maxlen)
|
||||
@ -693,15 +691,8 @@ static int qemudInitPaths(struct qemud_server *server,
|
||||
if (snprintf(server->logDir, PATH_MAX, "%s/.libvirt/log", pw->pw_dir) >= PATH_MAX)
|
||||
goto snprintf_error;
|
||||
|
||||
if (asprintf (&base, "%s/.libvirt", pw->pw_dir) == -1) {
|
||||
qemudLog (QEMUD_ERR, "out of memory in asprintf");
|
||||
return -1;
|
||||
}
|
||||
|
||||
} /* !remote */
|
||||
|
||||
if (base) free (base);
|
||||
|
||||
return 0;
|
||||
|
||||
snprintf_error:
|
||||
|
Loading…
x
Reference in New Issue
Block a user