Make version function exit itself.

This commit is contained in:
Jari Vetoniemi 2014-04-14 20:42:10 +03:00
parent 5dda1e46e9
commit 77f2c264e7

View File

@ -25,11 +25,11 @@ static struct {
0 /* monitor */
};
static void printVersion(const char *name)
static void version(const char *name)
{
char *base = strrchr(name, '/');
printf("%s v%s\n", (base ? base + 1 : name), bmVersion());
puts("<o/ \e[5mDISCO\e[m");
exit(EXIT_SUCCESS);
}
static void usage(FILE *out, const char *name)
@ -97,8 +97,7 @@ static void parseArgs(int *argc, char **argv[])
usage(stdout, *argv[0]);
break;
case 'v':
printVersion(*argv[0]);
exit(EXIT_SUCCESS);
version(*argv[0]);
break;
case 'i':