Skip to content

Commit

Permalink
fix fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
NikitaUnisikhin committed Jan 28, 2024
1 parent bfdaccf commit f87ccc5
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions sources/config_reader.c
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,8 @@ static od_keyword_t od_role_keywords[] = {
};

static inline int od_config_reader_watchdog(od_config_reader_t *reader,
od_storage_watchdog_t *watchdog, char* storage_name,
od_storage_watchdog_t *watchdog,
char *storage_name,
od_extention_t *extentions);

static int od_config_reader_open(od_config_reader_t *reader, char *config_file)
Expand Down Expand Up @@ -891,9 +892,9 @@ static int od_config_reader_storage(od_config_reader_t *reader,
if (storage->watchdog == NULL) {
return NOT_OK_RESPONSE;
}
if (od_config_reader_watchdog(reader, storage->watchdog, storage->name,
extentions) ==
NOT_OK_RESPONSE)
if (od_config_reader_watchdog(
reader, storage->watchdog, storage->name,
extentions) == NOT_OK_RESPONSE)
return NOT_OK_RESPONSE;
continue;
default:
Expand Down Expand Up @@ -1728,7 +1729,8 @@ static int od_config_reader_route(od_config_reader_t *reader, char *db_name,
}

static inline int od_config_reader_watchdog(od_config_reader_t *reader,
od_storage_watchdog_t *watchdog, char* storage_name,
od_storage_watchdog_t *watchdog,
char *storage_name,
od_extention_t *extentions)
{
char *watchdog_prefix = "watchdog_";
Expand All @@ -1737,17 +1739,19 @@ static inline int od_config_reader_watchdog(od_config_reader_t *reader,

char route_usr[watchdog_prefix_len + storage_name_len + 1];
char route_db[watchdog_prefix_len + storage_name_len + 1];
snprintf(route_usr, sizeof route_usr, "%s%s", watchdog_prefix, storage_name);
snprintf(route_db, sizeof route_db, "%s%s", watchdog_prefix, storage_name);
snprintf(route_usr, sizeof route_usr, "%s%s", watchdog_prefix,
storage_name);
snprintf(route_db, sizeof route_db, "%s%s", watchdog_prefix,
storage_name);

watchdog->route_usr = strdup(route_usr);
if (watchdog->route_usr == NULL)
return NOT_OK_RESPONSE;

watchdog->route_db = strdup(route_db);
if (watchdog->route_db == NULL)
return NOT_OK_RESPONSE;

int user_name_len = 0;
user_name_len = strlen(watchdog->route_usr);

Expand Down

0 comments on commit f87ccc5

Please sign in to comment.