duiaid.c: Trivial style cleanups. No functional change.

This commit is contained in:
Nicholas J. Kain 2014-03-19 05:58:29 -04:00
parent e188658c4c
commit 597c858f44

View File

@ -84,8 +84,7 @@ static int open_duidfile_read(void)
{
char duidfile[PATH_MAX];
get_duid_path(duidfile, sizeof duidfile);
int fd = -1;
fd = open(duidfile, O_RDONLY, 0);
int fd = open(duidfile, O_RDONLY, 0);
if (fd < 0) {
log_line("Failed to open duidfile '%s' for reading: %s",
duidfile, strerror(errno));
@ -97,8 +96,7 @@ static int open_duidfile_write(void)
{
char duidfile[PATH_MAX];
get_duid_path(duidfile, sizeof duidfile);
int fd = -1;
fd = open(duidfile, O_WRONLY|O_TRUNC|O_CREAT, 0644);
int fd = open(duidfile, O_WRONLY|O_TRUNC|O_CREAT, 0644);
if (fd < 0) {
log_line("Failed to open duidfile '%s' for writing: %s",
duidfile, strerror(errno));
@ -111,8 +109,7 @@ static int open_iaidfile_read(uint8_t *hwaddr, size_t hwaddrlen)
{
char iaidfile[PATH_MAX];
get_iaid_path(iaidfile, sizeof iaidfile, hwaddr, hwaddrlen);
int fd = -1;
fd = open(iaidfile, O_RDONLY, 0);
int fd = open(iaidfile, O_RDONLY, 0);
if (fd < 0) {
log_line("Failed to open iaidfile '%s' for reading: %s",
iaidfile, strerror(errno));
@ -124,8 +121,7 @@ static int open_iaidfile_write(uint8_t *hwaddr, size_t hwaddrlen)
{
char iaidfile[PATH_MAX];
get_iaid_path(iaidfile, sizeof iaidfile, hwaddr, hwaddrlen);
int fd = -1;
fd = open(iaidfile, O_WRONLY|O_TRUNC|O_CREAT, 0644);
int fd = open(iaidfile, O_WRONLY|O_TRUNC|O_CREAT, 0644);
if (fd < 0) {
log_line("Failed to open iaidfile '%s' for writing: %s",
iaidfile, strerror(errno));