tweaks: avoid a compiler warning
parent
b72f3b10ba
commit
e0d00bc750
|
@ -129,7 +129,7 @@ bool write_lockfile(const char *lockfilename, const char *filename, bool modifie
|
||||||
struct passwd *mypwuid = getpwuid(myuid);
|
struct passwd *mypwuid = getpwuid(myuid);
|
||||||
char myhostname[32];
|
char myhostname[32];
|
||||||
int fd;
|
int fd;
|
||||||
FILE *filestream;
|
FILE *filestream = NULL;
|
||||||
char *lockdata;
|
char *lockdata;
|
||||||
size_t wroteamt;
|
size_t wroteamt;
|
||||||
|
|
||||||
|
@ -155,7 +155,7 @@ bool write_lockfile(const char *lockfilename, const char *filename, bool modifie
|
||||||
if (fd > 0)
|
if (fd > 0)
|
||||||
filestream = fdopen(fd, "wb");
|
filestream = fdopen(fd, "wb");
|
||||||
|
|
||||||
if (fd < 0 || filestream == NULL) {
|
if (filestream == NULL) {
|
||||||
statusline(MILD, _("Error writing lock file %s: %s"),
|
statusline(MILD, _("Error writing lock file %s: %s"),
|
||||||
lockfilename, strerror(errno));
|
lockfilename, strerror(errno));
|
||||||
if (fd > 0)
|
if (fd > 0)
|
||||||
|
|
Loading…
Reference in New Issue