[EMAIL PROTECTED] wrote:
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 <[EMAIL PROTECTED]> 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.
Thanks. I wonder why strstr() is harmful. I didn't know strchr(), so I always used strstr() before.

antrik:
by the way, which letter should be used for the short option? or should I just use the long option '--device'?

Zheng Da


Reply via email to