diff options
author | harti <harti@FreeBSD.org> | 2003-08-20 08:25:36 +0000 |
---|---|---|
committer | harti <harti@FreeBSD.org> | 2003-08-20 08:25:36 +0000 |
commit | 52d81d4aa18fde1290b4c965fed027b95f1672cd (patch) | |
tree | 6e84ab8c5dd59306fb9a6ac1001e167c761ebd33 /sbin/atm | |
parent | 3d4a0b18eea33e642b28d32919cc5ef0e9c4157b (diff) | |
download | FreeBSD-src-52d81d4aa18fde1290b4c965fed027b95f1672cd.zip FreeBSD-src-52d81d4aa18fde1290b4c965fed027b95f1672cd.tar.gz |
Get rid of a __DECONST by strdup'ing the string in question. When
called this way the program just prints its help intro, so the
memory leak is not a problem.
Pointed out by: bde
Diffstat (limited to 'sbin/atm')
-rw-r--r-- | sbin/atm/atmconfig/main.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sbin/atm/atmconfig/main.c b/sbin/atm/atmconfig/main.c index 5430fbb..fcdcd06 100644 --- a/sbin/atm/atmconfig/main.c +++ b/sbin/atm/atmconfig/main.c @@ -105,7 +105,8 @@ help_func(int argc, char *argv[]) errx(1, "help file not found"); if (argc == 0) { - argv[0] = __DECONST(char *, "intro"); + if ((argv[0] = strdup("intro")) == NULL) + err(1, NULL); argc = 1; } |