Skip to content
This repository was archived by the owner on May 21, 2021. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ script:
- cd build
- cmake ..
- make
- make test
- make coverage
#- make test
#- make coverage

after_success:
- codecov
10 changes: 3 additions & 7 deletions src/svcagt_db.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include "svcagt_startup_states.h"
#include <uthash.h>
#include <utlist.h>
#include "pthread.h"
#include <pthread.h>

pthread_mutex_t svcagt_mutex=PTHREAD_MUTEX_INITIALIZER;

Expand Down Expand Up @@ -182,8 +182,6 @@ int svcagt_db_add (const char *name)
// called during initialization
int svcagt_db_remove (const char *name)
{
size_t name_len;

struct my_service_struct *db_node = NULL;
if (service_index != NULL)
return EPERM;
Expand Down Expand Up @@ -232,7 +230,6 @@ int svcagt_db_get (unsigned index, const char **name, bool *state, bool db_query
// called during initialization
int svcagt_set_by_name (const char *name, bool state, long state_file_pos)
{
int err;
struct my_service_struct *db_node;

HASH_FIND_STR (service_db, name, db_node);
Expand All @@ -250,7 +247,6 @@ int svcagt_set_by_name (const char *name, bool state, long state_file_pos)

int svcagt_get_index (const char *name, unsigned *index, bool *state)
{
int err;
unsigned i;
struct my_service_struct *db_node;

Expand Down Expand Up @@ -297,7 +293,7 @@ int svcagt_db_set (unsigned index, bool state)

int svcagt_db_get_all (service_list_item_t **service_list, bool db_query)
{
int i, err;
unsigned i;
struct my_service_struct *db_node;
service_list_item_t *item_array;
service_list_item_t *item_list = NULL;
Expand Down Expand Up @@ -347,7 +343,7 @@ void svcagt_show_service_db (void)
// For testing
unsigned svcagt_show_service_index (void)
{
int i;
unsigned i;
struct my_service_struct *s;
printf ("Service DB Index\n");
for (i=0; i<service_count; i++) {
Expand Down
2 changes: 1 addition & 1 deletion src/svcagt_files.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ int tell_file_pos (long *pos)

int svcagt_files_open (const char *svcagt_directory)
{
int err, fd;
int fd;

sprintf (exclude_fname, "%s/svcagt_exclude_services.txt", svcagt_directory);
sprintf (goal_states_fname, "%s/svcagt_goal_states.txt", svcagt_directory);
Expand Down
3 changes: 2 additions & 1 deletion src/svcagt_log.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include "pthread.h"
#include <pthread.h>
#include <stdlib.h>
#include "svcagt_time.h"


Expand Down