Skip to content

Commit

Permalink
Merge pull request #116 from marcone/master
Browse files Browse the repository at this point in the history
Make some functions static
  • Loading branch information
jfdelnero authored Nov 11, 2024
2 parents 51a1e43 + d720093 commit 49219da
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
CFLAGS += -I./inc -lpthread -Wall
CFLAGS += -I./inc -Wall
LDFLAGS += -lpthread

sources := $(wildcard src/*.c)
objects := $(sources:src/%.c=obj/%.o)
Expand Down Expand Up @@ -29,7 +30,7 @@ endif
all: umtprd

umtprd: $(objects) $(ops_objects)
${CC} -o $@ $^ $(LDFLAGS) -lpthread
${CC} -o $@ $^ $(LDFLAGS)

$(objects): obj/%.o: src/%.c | output_dir
${CC} -o $@ $^ -c $(CPPFLAGS) $(CFLAGS)
Expand Down
4 changes: 2 additions & 2 deletions src/inotify.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,12 @@ static int get_file_info(mtp_ctx * ctx, const struct inotify_event *event, fs_en
return 0;
}

void *inotify_gotsig(int sig, siginfo_t *info, void *ucontext)
static void *inotify_gotsig(int sig, siginfo_t *info, void *ucontext)
{
return NULL;
}

void* inotify_thread(void* arg)
static void* inotify_thread(void* arg)
{
mtp_ctx * ctx;
int i, length;
Expand Down
6 changes: 3 additions & 3 deletions src/msgqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ typedef struct mesg_buffer_ {
char mesg_text[MAX_MSG_SIZE];
} queue_msg_buf;

void *msgqueue_gotsig(int sig, siginfo_t *info, void *ucontext)
static void *msgqueue_gotsig(int sig, siginfo_t *info, void *ucontext)
{
return NULL;
}

void* msgqueue_thread( void* arg )
static void* msgqueue_thread( void* arg )
{
mtp_ctx * ctx;
queue_msg_buf msg_buf;
Expand Down Expand Up @@ -234,7 +234,7 @@ void* msgqueue_thread( void* arg )
return NULL;
}

int get_current_exec_path( char * exec_path, int maxsize )
static int get_current_exec_path( char * exec_path, int maxsize )
{
pid_t pid;
char path[PATH_MAX];
Expand Down

0 comments on commit 49219da

Please sign in to comment.