Merge pull request #89 from ty4tw/develop

Update make codes simple #86
This commit is contained in:
Tomoaki Yamaguchi
2017-09-28 22:41:25 +09:00
committed by GitHub
2 changed files with 6 additions and 6 deletions

View File

@@ -62,14 +62,16 @@ $(SUBDIR)/MQTTSNUnsubscribeServer.c
CXX := g++ CXX := g++
CPPFLAGS += CPPFLAGS +=
INCLUDES += -I$(SRCDIR) \ INCLUDE :=
INCLUDES += $(INCLUDE) -I$(SRCDIR) \
-I$(SRCDIR)/$(OS) \ -I$(SRCDIR)/$(OS) \
-I$(SRCDIR)/$(OS)/$(SENSORNET) \ -I$(SRCDIR)/$(OS)/$(SENSORNET) \
-I$(SUBDIR) \ -I$(SUBDIR) \
-I$(SRCDIR)/$(TEST) -I$(SRCDIR)/$(TEST)
DEFS := DEFS :=
LIBS += -L/usr/local/lib LIB :=
LIBS += $(LIB) -L/usr/local/lib
LDFLAGS := LDFLAGS :=
CXXFLAGS := -Wall -O3 -std=c++11 CXXFLAGS := -Wall -O3 -std=c++11
LDADD := -lpthread -lssl -lcrypto -lrt LDADD := -lpthread -lssl -lcrypto -lrt

View File

@@ -230,12 +230,10 @@ Client* ClientList::createClient(SensorNetAddress* addr, MQTTSNString* clientId,
else else
{ {
MQTTSNString dummyId; MQTTSNString dummyId;
char* id = (char*)malloc(1); dummyId.cstring = strdup("");
*id = 0;
dummyId.cstring = id;
dummyId.lenstring.len = 0; dummyId.lenstring.len = 0;
client->setClientId(dummyId); client->setClientId(dummyId);
free(id); free(dummyId.cstring);
} }
/* add the list */ /* add the list */