Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--agent/tcf/main/main.c9
-rw-r--r--agent/tcf/services/dwarfcache.c2
2 files changed, 4 insertions, 7 deletions
diff --git a/agent/tcf/main/main.c b/agent/tcf/main/main.c
index c43bf3b9..45b3680b 100644
--- a/agent/tcf/main/main.c
+++ b/agent/tcf/main/main.c
@@ -196,11 +196,8 @@ int main(int argc, char ** argv) {
/* Parse arguments */
for (ind = 1; ind < argc; ind++) {
char * s = argv[ind];
- if (*s != '-') {
- break;
- }
- s++;
- while ((c = *s++) != '\0') {
+ if (*s++ != '-') break;
+ while (s && (c = *s++) != '\0') {
switch (c) {
case 'i':
interactive = 1;
@@ -279,7 +276,7 @@ int main(int argc, char ** argv) {
break;
#endif
}
- s = "";
+ s = NULL;
break;
default:
diff --git a/agent/tcf/services/dwarfcache.c b/agent/tcf/services/dwarfcache.c
index 9194a6d6..042079ec 100644
--- a/agent/tcf/services/dwarfcache.c
+++ b/agent/tcf/services/dwarfcache.c
@@ -1142,7 +1142,7 @@ ObjectInfo * get_dwarf_children(ObjectInfo * obj) {
if (set_trap(&trap)) {
U8_T end_pos = sCompUnit->mDesc.mUnitOffs + sCompUnit->mDesc.mUnitSize;
if (obj->mSibling != NULL) end_pos = obj->mSibling->mID - sDebugSection->addr;
- dio_ReadEntry(NULL, ~(U2_T)0u);
+ dio_ReadEntry(NULL, (U2_T)0xffffu);
sParentObject = obj;
sPrevSibling = NULL;
while (dio_GetPos() < end_pos) {

Back to the top