qemud/qemud.c (qemudInitPaths): Remove unused code.

This commit is contained in:
Jim Meyering 2007-12-06 16:41:43 +00:00
parent efd495d667
commit 7ff9eebeba
2 changed files with 4 additions and 9 deletions

View File

@ -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,

View File

@ -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: