Skip to content

Commit

Permalink
* MDF [log] use correct MACRO NNG_PLATFORM_WINDOWS
Browse files Browse the repository at this point in the history
Signed-off-by: jaylin <jaylin@emqx.io>
  • Loading branch information
JaylinYu committed Aug 13, 2024
1 parent 3e56f56 commit f5ada64
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 4 additions & 2 deletions src/supplemental/mqtt/mqtt_public.c
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,8 @@ mqtt_property_free(property *prop)
void
mqtt_property_foreach(property *prop, void (*cb)(property *))
{
return property_foreach(prop, cb);
property_foreach(prop, cb);
return;
}

int
Expand Down Expand Up @@ -809,7 +810,8 @@ mqtt_property_get_value(property *prop, uint8_t prop_id)
void
mqtt_property_append(property *prop_list, property *last)
{
return property_append(prop_list, last);
property_append(prop_list, last);
return;
}


Expand Down
6 changes: 3 additions & 3 deletions src/supplemental/nanolib/log.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ file_callback(log_event *ev)
#else
pid_t pid = syscall(__NR_gettid);
#endif
#ifndef NANO_PLATFORM_WINDOWS
#ifndef NNG_PLATFORM_WINDOWS
if (nng_access(ev->config->dir, W_OK) < 0) {
fprintf(stderr, "open path %s failed! close file!\n",
ev->config->dir);
Expand Down Expand Up @@ -322,7 +322,7 @@ file_rotation(FILE *fp, conf_log *config)
// file missing, recreate one
if (fp)
fclose(fp);
#ifndef NANO_PLATFORM_WINDOWS
#ifndef NNG_PLATFORM_WINDOWS
if (nng_access(config->dir, W_OK) < 0) {
fprintf(stderr, "open path %s failed\n",
config->dir);
Expand Down Expand Up @@ -373,7 +373,7 @@ file_rotation(FILE *fp, conf_log *config)
rename(config->abs_path, backup_log_path);
nni_free(log_name, log_name_len);
nni_strfree(backup_log_path);
#ifndef NANO_PLATFORM_WINDOWS
#ifndef NNG_PLATFORM_WINDOWS
if (nng_access(config->dir, W_OK) < 0) {
fprintf(stderr, "open path %s failed\n",
config->dir);
Expand Down

0 comments on commit f5ada64

Please sign in to comment.