Skip to content

Commit

Permalink
j1939acd, j1939sr: remove use of program_invocation_name and program_…
Browse files Browse the repository at this point in the history
…invocation_short_name

Link: linux-can#404
  • Loading branch information
marckleinebudde committed Feb 6, 2023
1 parent e409aa4 commit d4e78a4
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
10 changes: 0 additions & 10 deletions j1939acd.c
Original file line number Diff line number Diff line change
Expand Up @@ -466,9 +466,6 @@ int main(int argc, char *argv[])
struct sockaddr_can saddr;
uint64_t cmd_name;

#ifdef _GNU_SOURCE
program_invocation_name = program_invocation_short_name;
#endif
/* argument parsing */
while ((opt = getopt_long(argc, argv, optstring, long_opts, NULL)) != -1)
switch (opt) {
Expand All @@ -485,13 +482,6 @@ int main(int argc, char *argv[])
s.current_sa = strtoul(optarg, 0, 0);
break;
case 'p':
#ifdef _GNU_SOURCE
if (asprintf(&program_invocation_name, "%s.%s",
program_invocation_short_name, optarg) < 0)
err(1, "asprintf(program invocation name)");
#else
err(0, "compile with -D_GNU_SOURCE to use -p");
#endif
break;
default:
fputs(help_msg, stderr);
Expand Down
3 changes: 0 additions & 3 deletions j1939sr.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,6 @@ int main(int argc, char **argv)
struct pollfd pfd[2];
uint8_t *buf;

#ifdef _GNU_SOURCE
program_invocation_name = program_invocation_short_name;
#endif
/* argument parsing */
while ((opt = getopt_long(argc, argv, optstring, long_opts, NULL)) != -1)
switch (opt) {
Expand Down

0 comments on commit d4e78a4

Please sign in to comment.