On Wed, 2012-06-27 at 14:41 +0300, John Yani wrote:
+static void fill_logicaldisk( struct table *table ) +{
- static const WCHAR device_id[] = {'0',0};
- struct record_logicaldisk *rec;
- FIXME("returns a fake logical disks table\n");
- if (!(table->data = heap_alloc( sizeof(*rec) )))
- {
return;
- }
- rec = (struct record_logicaldisk *)(table->data);
- rec->device_id = heap_strdupW( device_id );
- table->num_rows = 1;
- TRACE("created %u rows\n", table->num_rows);
+}
There's no need to create a copy of device_id. Just assign it to rec->device_id and remove COL_FLAG_DYNAMIC from the column definition.