cast so size/mtime doesn't get hosed

This commit is contained in:
cgd 1994-03-13 13:33:28 +00:00
parent 663711d26e
commit 377bda3e78

View File

@ -33,7 +33,7 @@
#ifndef lint
/* from: static char sccsid[] = "@(#)server.c 8.1 (Berkeley) 6/9/93"; */
static char *rcsid = "$Id: server.c,v 1.5 1994/03/07 05:05:46 cgd Exp $";
static char *rcsid = "$Id: server.c,v 1.6 1994/03/13 13:33:28 cgd Exp $";
#endif /* not lint */
#include <sys/wait.h>
@ -417,7 +417,7 @@ sendf(rname, opts)
}
}
(void) sprintf(buf, "K%o %o %qd %ld %s %s %s\n", opts,
stb.st_mode & 07777, stb.st_size, stb.st_mtime,
stb.st_mode & 07777, (quad_t)stb.st_size, stb.st_mtime,
protoname(), protogroup(), rname);
if (debug)
printf("buf = %s", buf);
@ -470,7 +470,7 @@ sendf(rname, opts)
return;
}
(void) sprintf(buf, "R%o %o %qd %ld %s %s %s\n", opts,
stb.st_mode & 07777, stb.st_size, stb.st_mtime,
stb.st_mode & 07777, (quad_t)stb.st_size, stb.st_mtime,
protoname(), protogroup(), rname);
if (debug)
printf("buf = %s", buf);
@ -670,7 +670,8 @@ query(name)
switch (stb.st_mode & S_IFMT) {
case S_IFREG:
(void) sprintf(buf, "Y%qd %ld\n", stb.st_size, stb.st_mtime);
(void) sprintf(buf, "Y%qd %ld\n", (quad_t)stb.st_size,
stb.st_mtime);
(void) write(rem, buf, strlen(buf));
break;