提交 7ff9eebe 编写于 作者: J Jim Meyering

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

上级 efd495d6
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:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册