Commit 84d6f1a5 authored by David Lawrence Ramsey's avatar David Lawrence Ramsey Committed by Benno Schulenberg
Browse files

tweaks: adjust the type of four lockfile variables

The functions read() and fwrite() take size_t, not ssize_t.

And line numbers in the file should be displayed as a long type instead
of an int, since the effective type of ssize_t is not int, but long.
parent ecccb8d0
Showing with 6 additions and 6 deletions
+6 -6
......@@ -179,8 +179,8 @@ int write_lockfile(const char *lockfilename, const char *origfilename, bool modi
struct stat fileinfo;
char *lockdata = charalloc(1024);
char myhostname[32];
ssize_t lockdatalen = 1024;
ssize_t wroteamt;
size_t lockdatalen = 1024;
size_t wroteamt;
mypid = getpid();
myuid = geteuid();
......@@ -320,8 +320,8 @@ int do_lockfile(const char *filename)
fprintf(stderr, "lock file name is %s\n", lockfilename);
#endif
if (stat(lockfilename, &fileinfo) != -1) {
ssize_t readtot = 0;
ssize_t readamt = 0;
size_t readtot = 0;
size_t readamt = 0;
char *lockbuf, *question, *pidstring, *postedname, *promptstr;
int room, response;
......
......@@ -642,8 +642,8 @@ filestruct *fsfromline(ssize_t lineno)
f = f->next;
if (f->lineno != lineno) {
statusline(ALERT, _("Internal error: can't match line %d. "
"Please save your work."), lineno);
statusline(ALERT, _("Internal error: can't match line %ld. "
"Please save your work."), (long)lineno);
return NULL;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment