Less aggressive Makefiles

This commit is contained in:
2017-05-18 16:08:09 +03:00
parent 095fda75d2
commit 88d4942e2c
3 changed files with 7 additions and 5 deletions

View File

@@ -37,10 +37,10 @@ $(EXECUTABLE): $(OBJECTS)
@$(CC) $(CCFLAGS) $(DBFLAGS) -c $< -o $@
clean:
rm -rf $(OBJECTS) $(EXECUTABLE)
rm -f $(OBJECTS) $(EXECUTABLE)
distclean:
rm -rf $(OBJECTS)
rm -f $(OBJECTS)
install:
install -m755 -D $(EXECUTABLE) "$(INSTALLDIR)/$(EXECUTABLE)"

View File

@@ -32,8 +32,8 @@ debug: $(SOURCES) $(EXECUTABLE)
@echo ' Compiling debug with $(CCFLAGS)'
clean:
rm -rf $(OBJECTS) $(EXECUTABLE)
rm -f $(OBJECTS) $(EXECUTABLE)
distclean:
rm -rf $(OBJECTS)
rm -f $(OBJECTS)

View File

@@ -9,6 +9,7 @@ int total_queues;
int start_msg_queue(void)
{
int i;
for (i = 0; i < total_queues; i++) {
if (slot[i] == NULL) {
slot[i] = (struct msg_t *)calloc(100, sizeof(struct msg_t));
@@ -37,6 +38,7 @@ int start_job_queue(int poolsize)
int add_msg_to_queue(int id, struct msg_t buf)
{
int i;
for (i = 0; i < 100; i++) {
if (slot[id][i].meta.is_recv) {
memcpy(&slot[id][i], &buf, sizeof(struct msg_t));