|
From: | Da Zheng |
Subject: | Re: The patch of boot to open a virtual network interface |
Date: | Fri, 22 Aug 2008 11:55:52 +0200 |
User-agent: | Thunderbird 2.0.0.16 (Macintosh/20080707) |
olafBuddenhagen@gmx.net wrote:
Thanks. I wonder why strstr() is harmful. I didn't know strchr(), so I always used strstr() before.Hi, On Thu, Aug 21, 2008 at 10:43:03AM +0200, zhengda wrote:Ben Asselstine wrote:On Tue, Aug 19, 2008 at 4:02 PM, zhengda <zhengda1936@gmail.com> wrote:+ case 'f': + dev_file = strstr (arg, "="); + if (dev_file == NULL) + return ARGP_ERR_UNKNOWN; + *dev_file = 0; + add_dev_map (arg, dev_file+1); + break;Also, the use of strstr is pernicious.why? Is there any other function to do it?Use strchr() to search for a single character.
antrik:by the way, which letter should be used for the short option? or should I just use the long option '--device'?
Zheng Da
[Prev in Thread] | Current Thread | [Next in Thread] |