summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2011-10-03 13:23:07 +0200
committerHans de Goede <hdegoede@redhat.com>2011-10-03 13:23:07 +0200
commit4ecce6f3e7519e8acc694712bd6a8d56a01f2fef (patch)
tree540ef7b78b40aec0eefa75453e5db90af2cc3919
parent93045c07f2b8423070a12d0a6ff7a30c4b9d6840 (diff)
Fix various compiler warnings
Sgined-off-by: Hans de Goede <hdegoede@redhat.com>
-rw-r--r--src/vdagent.c6
-rw-r--r--src/vdagentd.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/vdagent.c b/src/vdagent.c
index f0d3b32..f475120 100644
--- a/src/vdagent.c
+++ b/src/vdagent.c
@@ -75,7 +75,7 @@ void daemon_read_complete(struct udscs_connection **connp,
free(data);
break;
case VDAGENTD_VERSION:
- if (strcmp(data, VERSION) != 0) {
+ if (strcmp((char *)data, VERSION) != 0) {
fprintf(logfile,
"Fatal vdagentd version mismatch: got %s expected %s\n",
data, VERSION);
@@ -131,7 +131,7 @@ void daemonize(void)
case 0:
close(0); close(1); close(2);
setsid();
- x = open("/dev/null", O_RDWR); dup(x); dup(x);
+ x = open("/dev/null", O_RDWR); x = dup(x); x = dup(x);
break;
case -1:
fprintf(logfile, "fork: %s\n", strerror(errno));
@@ -207,7 +207,7 @@ int main(int argc, char *argv[])
}
if (file_test(portdev) != 0) {
- fprintf(logfile, "Missing virtio device: %s\n",
+ fprintf(logfile, "Missing virtio device '%s': %s\n",
portdev, strerror(errno));
retval = 1;
goto finish;
diff --git a/src/vdagentd.c b/src/vdagentd.c
index 939d36a..3419601 100644
--- a/src/vdagentd.c
+++ b/src/vdagentd.c
@@ -650,7 +650,7 @@ void daemonize(void)
case 0:
close(0); close(1); close(2);
setsid();
- x = open("/dev/null", O_RDWR); dup(x); dup(x);
+ x = open("/dev/null", O_RDWR); x = dup(x); x = dup(x);
pidfile = fopen(pidfilename, "w");
if (pidfile) {
fprintf(pidfile, "%d\n", (int)getpid());