rem: foo=str2s((unsigned char*)arg+2,arg_end-arg-2,&err);
add: foo=str2s(arg+2,arg_end-arg-2,&err);
context: int set_modem_arg(struct modem *mdm, char *arg, char *arg_end){	int err, foo;	if (*(arg+1)!='=') {		LOG(L_ERR,"ERROR: invalid parameter syntax near [=]\n");		goto error;	}	switch (*arg)	{		case 'd':  /* device */			memcpy(mdm->device,arg+2,arg_end-arg-2);			mdm->device[arg_end-arg-2] = 0;			break;		case 'p':  /* pin */			memcpy(mdm->pin,arg+2,arg_end-arg-2);			mdm->pin[arg_end-arg-2] = 0;			break;		case 'm':  /* mode */			if (!strncasecmp(arg+2,"OLD",3)			&& arg_end-arg-2==3) {				mdm->mode = MODE_OLD;			} else if (!strncasecmp(arg+2,"DIGICOM",7)			&& arg_end-arg-2==7) {				mdm->mode = MODE_DIGICOM;			} else if (!strncasecmp(arg+2,"ASCII",5)			&& arg_end-arg-2==5) {				mdm->mode = MODE_ASCII;			} else if (!strncasecmp(arg+2,"NEW",3)			&& arg_end-arg-2==3) {				mdm->mode = MODE_NEW;			} else {				LOG(L_ERR,"ERROR: invalid value \"%.*s\" for param [m]\n",					arg_end-arg-2,arg+2);				goto error;			}			break;		case 'r':  /* retry time */			foo=str2s((unsigned char*)arg+2,arg_end-arg-2,&err);			if (err) {				LOG(L_ERR,"ERROR:set_modem_arg: cannot convert [r] arg to"					" integer!\n");				goto error;			}			mdm->retry = foo;			break;		case 'l':  /* looping interval */			foo=str2s((unsigned char*)arg+2,arg_end-arg-2,&err);			if (err) {				LOG(L_ERR,"ERROR:set_modem_arg: cannot convert [l] arg to"					" integer!\n");				goto error;			}			mdm->looping_interval = foo;			break;		case 'b':  /* baudrate */			foo=str2s((unsigned char*)arg+2,arg_end-arg-2,&err);			if (err) {				LOG(L_ERR,"ERROR:set_modem_arg: cannot convert [b] arg to"					" integer!\n");				goto error;			}			switch (foo) {				case   300: foo=B300; break;				case  1200: foo=B1200; break;				case  2400: foo=B2400; break;				case  9600: foo=B9600; break;				case 19200: foo=B19200; break;				case 38400: foo=B38400; break;				default:					LOG(L_ERR,"ERROR:set_modem_arg: unsupported value %d "						"for [b] arg!\n",foo);					goto error;			}			mdm->baudrate = foo;			break;		default:			LOG(L_ERR,"ERROR:set_modem_arg: unknow param name [%c]\n",*arg);	}	return 1;error:	return -1;}