diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2004-02-07 21:10:27 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2004-02-07 21:10:27 +0000 |
commit | 2cd4d5669cdb5c582518b407a455689f631e68f0 (patch) | |
tree | fbc65602e03cd9bd00efb8bdd3f26ae059f6d701 /sbin | |
parent | a1cc5ea968afbeac22584f6821355e4abdfe5ab4 (diff) |
it's a little sad that this beast has only one asprintf, and that one
just mimics a strdup... so make it a strdup. spotted by theo
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/dhclient/clparse.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/dhclient/clparse.c b/sbin/dhclient/clparse.c index 119fd9a7e88..846f2e5d31b 100644 --- a/sbin/dhclient/clparse.c +++ b/sbin/dhclient/clparse.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clparse.c,v 1.6 2004/02/07 11:35:59 henning Exp $ */ +/* $OpenBSD: clparse.c,v 1.7 2004/02/07 21:10:26 henning Exp $ */ /* Parser for dhclient config and lease files... */ @@ -694,7 +694,7 @@ parse_option_decl(FILE *cfile, struct option_data *options) skip_to_semi(cfile); return (NULL); } - if (asprintf(&vendor, "%s", val) == -1) + if ((vendor = strdup(val)) == NULL) error("no memory for vendor information."); token = peek_token(&val, cfile); |