mirror of
https://codeberg.org/scip/diceware.git
synced 2025-12-17 19:00:57 +01:00
fix format, fix free()
This commit is contained in:
@@ -37,14 +37,12 @@ int usage() {
|
||||
"-y --symbols Replace space with -, add non-letters\n"
|
||||
"-d --debug Enable debug output\n"
|
||||
"-v --version Print program version\n"
|
||||
"-h -? --help Print this help screen\n"
|
||||
);
|
||||
"-h -? --help Print this help screen\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
int WMIN, WMAX, humantoss, verbose, dontjump, symbols;
|
||||
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
int count = 4;
|
||||
char *dictfile = NULL;
|
||||
@@ -67,7 +65,8 @@ int main (int argc, char **argv) {
|
||||
{"debug", no_argument, NULL, 'd'},
|
||||
};
|
||||
|
||||
while ((opt = getopt_long(argc, argv, "l:m:tf:c:vh?dny", longopts, NULL)) != -1) {
|
||||
while ((opt = getopt_long(argc, argv, "l:m:tf:c:vh?dny", longopts, NULL)) !=
|
||||
-1) {
|
||||
switch (opt) {
|
||||
case 'v':
|
||||
fprintf(stderr, "This is %s version %s\n", argv[0], VERSION);
|
||||
@@ -176,7 +175,7 @@ void getwords(char *dictfile, int count) {
|
||||
|
||||
free(tossed);
|
||||
|
||||
for(i=0; i<6666; i++)
|
||||
for (i = 0; i < 66666; i++)
|
||||
if (words[i] != NULL)
|
||||
free(words[i]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user