Skip to content

Commit

Permalink
Use more reliabe macros to print --version output
Browse files Browse the repository at this point in the history
PACKAGE_STRING, in some cases, might not include the version.
Use PACKAGE_NAME PACKAGE_VERSION instead.

Thanks to @httpstorm to point this out!
  • Loading branch information
nikias committed Sep 14, 2024
1 parent 10d9eae commit e9a0dce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ static void parse_opts(int argc, char **argv)
++verbose;
break;
case 'V':
printf("%s\n", PACKAGE_STRING);
printf("%s %s\n", PACKAGE_NAME, PACKAGE_VERSION);
exit(0);
case 'U':
drop_privileges = 1;
Expand Down

0 comments on commit e9a0dce

Please sign in to comment.