]> git.decadent.org.uk Git - nfs-utils.git/blobdiff - support/nfs/cacheio.c
mountd: Avoid unnecessary type conversions
[nfs-utils.git] / support / nfs / cacheio.c
index 0587ecbecefff75636e81637a56e45046adb5af6..e641c4535c652c803dc067e4cfe3f4633bc28b12 100644 (file)
@@ -153,6 +153,11 @@ void qword_printuint(FILE *f, unsigned int num)
        fprintf(f, "%u ", num);
 }
 
+void qword_printtimefrom(FILE *f, unsigned int num)
+{
+       fprintf(f, "%lu ", time(0) + num);
+}
+
 int qword_eol(FILE *f)
 {
        int err;
@@ -241,7 +246,7 @@ int qword_get_int(char **bpp, int *anint)
        return 0;
 }
 
-int qword_get_uint(char *bpp, unsigned int *anint)
+int qword_get_uint(char **bpp, unsigned int *anint)
 {
        char buf[50];
        char *ep;
@@ -349,7 +354,7 @@ cache_flush(int force)
                sprintf(path, "/proc/net/rpc/%s/flush", cachelist[c]);
                fd = open(path, O_RDWR);
                if (fd >= 0) {
-                       if (write(fd, stime, strlen(stime)) != strlen(stime)) {
+                       if (write(fd, stime, strlen(stime)) != (ssize_t)strlen(stime)) {
                                xlog_warn("Writing to '%s' failed: errno %d (%s)",
                                path, errno, strerror(errno));
                        }