memset(elevator_name, 0, sizeof(elevator_name)); strncpy(elevator_name, name, sizeof(elevator_name)); 
elevator_name[sizeof(elevator_name) - 1] = '\0'; strncpy(elevator_name, name, sizeof(elevator_name) - 1); len = strlen(elevator_name); 
ssize_t elv_iosched_store(request_queue_t *q, const char *name, size_t count){	char elevator_name[ELV_NAME_MAX];	struct elevator_type *e;	memset(elevator_name, 0, sizeof(elevator_name));	strncpy(elevator_name, name, sizeof(elevator_name));	if (elevator_name[strlen(elevator_name) - 1] == '\n')		elevator_name[strlen(elevator_name) - 1] = '\0';	e = elevator_get(elevator_name);	if (!e) {		printk(KERN_ERR "elevator: type %s not found\n", elevator_name);		return -EINVAL;	}	if (!strcmp(elevator_name, q->elevator->elevator_type->elevator_name)) {		elevator_put(e);		return count;	}	elevator_switch(q, e);	return count;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/be56123568072d223263a6a70a087d1e7faabb83/elevator.c/buggy/block/elevator.c