duiaid.c: Trivial style cleanups. No functional change.
This commit is contained in:
parent
e188658c4c
commit
597c858f44
@ -84,8 +84,7 @@ static int open_duidfile_read(void)
|
|||||||
{
|
{
|
||||||
char duidfile[PATH_MAX];
|
char duidfile[PATH_MAX];
|
||||||
get_duid_path(duidfile, sizeof duidfile);
|
get_duid_path(duidfile, sizeof duidfile);
|
||||||
int fd = -1;
|
int fd = open(duidfile, O_RDONLY, 0);
|
||||||
fd = open(duidfile, O_RDONLY, 0);
|
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
log_line("Failed to open duidfile '%s' for reading: %s",
|
log_line("Failed to open duidfile '%s' for reading: %s",
|
||||||
duidfile, strerror(errno));
|
duidfile, strerror(errno));
|
||||||
@ -97,8 +96,7 @@ static int open_duidfile_write(void)
|
|||||||
{
|
{
|
||||||
char duidfile[PATH_MAX];
|
char duidfile[PATH_MAX];
|
||||||
get_duid_path(duidfile, sizeof duidfile);
|
get_duid_path(duidfile, sizeof duidfile);
|
||||||
int fd = -1;
|
int fd = open(duidfile, O_WRONLY|O_TRUNC|O_CREAT, 0644);
|
||||||
fd = open(duidfile, O_WRONLY|O_TRUNC|O_CREAT, 0644);
|
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
log_line("Failed to open duidfile '%s' for writing: %s",
|
log_line("Failed to open duidfile '%s' for writing: %s",
|
||||||
duidfile, strerror(errno));
|
duidfile, strerror(errno));
|
||||||
@ -111,8 +109,7 @@ static int open_iaidfile_read(uint8_t *hwaddr, size_t hwaddrlen)
|
|||||||
{
|
{
|
||||||
char iaidfile[PATH_MAX];
|
char iaidfile[PATH_MAX];
|
||||||
get_iaid_path(iaidfile, sizeof iaidfile, hwaddr, hwaddrlen);
|
get_iaid_path(iaidfile, sizeof iaidfile, hwaddr, hwaddrlen);
|
||||||
int fd = -1;
|
int fd = open(iaidfile, O_RDONLY, 0);
|
||||||
fd = open(iaidfile, O_RDONLY, 0);
|
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
log_line("Failed to open iaidfile '%s' for reading: %s",
|
log_line("Failed to open iaidfile '%s' for reading: %s",
|
||||||
iaidfile, strerror(errno));
|
iaidfile, strerror(errno));
|
||||||
@ -124,8 +121,7 @@ static int open_iaidfile_write(uint8_t *hwaddr, size_t hwaddrlen)
|
|||||||
{
|
{
|
||||||
char iaidfile[PATH_MAX];
|
char iaidfile[PATH_MAX];
|
||||||
get_iaid_path(iaidfile, sizeof iaidfile, hwaddr, hwaddrlen);
|
get_iaid_path(iaidfile, sizeof iaidfile, hwaddr, hwaddrlen);
|
||||||
int fd = -1;
|
int fd = open(iaidfile, O_WRONLY|O_TRUNC|O_CREAT, 0644);
|
||||||
fd = open(iaidfile, O_WRONLY|O_TRUNC|O_CREAT, 0644);
|
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
log_line("Failed to open iaidfile '%s' for writing: %s",
|
log_line("Failed to open iaidfile '%s' for writing: %s",
|
||||||
iaidfile, strerror(errno));
|
iaidfile, strerror(errno));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user