# HG changeset patch # User Matti Hamalainen # Date 1527761289 -10800 # Node ID bddedc2e0ebb33d236996b12ce166c014dcb9b42 # Parent c2ad6c0e4975da8a43007951940fdc865ae22e13 Cleanups. diff -r c2ad6c0e4975 -r bddedc2e0ebb tools/objlink.c --- a/tools/objlink.c Thu May 31 13:04:53 2018 +0300 +++ b/tools/objlink.c Thu May 31 13:08:09 2018 +0300 @@ -169,8 +169,6 @@ void argShowHelp() { - int i; - dmPrintBanner(stdout, dmProgName, "[options]"); dmArgsPrintHelp(stdout, optList, optListN, 0); @@ -181,7 +179,7 @@ "\n" "Available memory models:\n"); - for (i = 0; i < nmemoryModels; i++) + for (int i = 0; i < nmemoryModels; i++) { const DMMemModel *m = &memoryModels[i]; printf(" %d = %-40s [%s] (%d kB)\n", @@ -655,7 +653,8 @@ if ((t = strrchr(tmpStr, '/'))) s = (t + 1); - else if ((t = strrchr(tmpStr, '\\'))) + else + if ((t = strrchr(tmpStr, '\\'))) s = (t + 1); else s = tmpStr; @@ -702,19 +701,17 @@ void memPrintEmpty(FILE *f, int n) { - int i; - for (i = 0; i < n; i++) + for (int i = 0; i < n; i++) fprintf(f, " | |\n"); } void dmDescribeMemory(FILE *f) { - int i; DMMemBlock *prev = NULL; memPrintLine(f); - for (i = 0; i < nmemBlocks; i++) + for (int i = 0; i < nmemBlocks; i++) { DMMemBlock *curr = &memBlocks[i]; char desc[512], *s; @@ -1012,6 +1009,5 @@ if (optDescribe) dmDescribeMemory(stdout); - exit(0); return 0; }