diff options
author | Hans de Goede <hdegoede@redhat.com> | 2011-10-03 13:23:07 +0200 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2011-10-03 13:23:07 +0200 |
commit | 4ecce6f3e7519e8acc694712bd6a8d56a01f2fef (patch) | |
tree | 540ef7b78b40aec0eefa75453e5db90af2cc3919 /src | |
parent | 93045c07f2b8423070a12d0a6ff7a30c4b9d6840 (diff) | |
download | vd_agent-4ecce6f3e7519e8acc694712bd6a8d56a01f2fef.tar.gz vd_agent-4ecce6f3e7519e8acc694712bd6a8d56a01f2fef.tar.xz vd_agent-4ecce6f3e7519e8acc694712bd6a8d56a01f2fef.zip |
Fix various compiler warnings
Sgined-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/vdagent.c | 6 | ||||
-rw-r--r-- | src/vdagentd.c | 2 |
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()); |