summaryrefslogtreecommitdiffstats
path: root/sbin/atm
diff options
context:
space:
mode:
authorharti <harti@FreeBSD.org>2003-08-20 08:25:36 +0000
committerharti <harti@FreeBSD.org>2003-08-20 08:25:36 +0000
commit52d81d4aa18fde1290b4c965fed027b95f1672cd (patch)
tree6e84ab8c5dd59306fb9a6ac1001e167c761ebd33 /sbin/atm
parent3d4a0b18eea33e642b28d32919cc5ef0e9c4157b (diff)
downloadFreeBSD-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.c3
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;
}
OpenPOWER on IntegriCloud