tmp_len = strnlen(op, 160) + 1; params_argv[1] = g_new(gchar, tmp_len); strncpy(params_argv[1], op, tmp_len); params_argv[ht_size+2] = NULL;
tmp_len = strnlen(rsc_type, 160) + 1; params_argv[0] = g_new(gchar, tmp_len); strncpy(params_argv[0], rsc_type, tmp_len);  tmp_len = strnlen(op_type, 160) + 1; params_argv[1] = g_new(gchar, tmp_len); strncpy(params_argv[1], op_type, tmp_len); params_argv[ht_size+2] = NULL;
prepare_cmd_parameters(const char * raname, const char * op, 			GHashTable * params_ht, RA_ARGV params_argv){	/* For lsb init scripts, no corresponding definite specification	 * But for lsb none-init scripts, maybe need it.	 */ 	int tmp_len;	int ht_size = 0;	if (params_ht) {		ht_size = g_hash_table_size(params_ht);	}	if ( ht_size+3 > MAX_PARAMETER_NUM ) {		cl_log(LOG_ERR, "Too many parameters");		return -1;	}		tmp_len = strnlen(raname, 160) + 1;	params_argv[0] = g_new(gchar, tmp_len); 	strncpy(params_argv[0], raname, tmp_len);	tmp_len = strnlen(op, 160) + 1;	params_argv[1] = g_new(gchar, tmp_len); 	strncpy(params_argv[1], op, tmp_len);	params_argv[ht_size+2] = NULL; 		if (params_ht) {		g_hash_table_foreach(params_ht, 				params_hash_to_argv, params_argv);	}	return 0;}