Contribute/BiteSizedTasks: Difference between revisions

From QEMU
(Created page with '== API conversion == * Look for uses of malloc, and convert them to either g_malloc, g_new (more rarely g_try_malloc or g_try_new if a lot of memory is being allocated). Likewis…')
 
No edit summary
Line 2: Line 2:
* Look for uses of malloc, and convert them to either g_malloc, g_new (more rarely g_try_malloc or g_try_new if a lot of memory is being allocated).  Likewise, convert calloc to either g_new0 or g_try_new0.  Drop return value checks unless using g_try_new/g_try_new0.
* Look for uses of malloc, and convert them to either g_malloc, g_new (more rarely g_try_malloc or g_try_new if a lot of memory is being allocated).  Likewise, convert calloc to either g_new0 or g_try_new0.  Drop return value checks unless using g_try_new/g_try_new0.
* Add checks for NULL return value to uses of load_image_targphys, qemu_find_file.
* Add checks for NULL return value to uses of load_image_targphys, qemu_find_file.
* Add checks for negative return value to uses of get_image_size.
* [[CodeTransitions#Makefile|Associate external libraries with the object files that actually use them]]
* [[CodeTransitions#Makefile|Associate external libraries with the object files that actually use them]]

Revision as of 11:17, 12 November 2014

API conversion

  • Look for uses of malloc, and convert them to either g_malloc, g_new (more rarely g_try_malloc or g_try_new if a lot of memory is being allocated). Likewise, convert calloc to either g_new0 or g_try_new0. Drop return value checks unless using g_try_new/g_try_new0.
  • Add checks for NULL return value to uses of load_image_targphys, qemu_find_file.
  • Add checks for negative return value to uses of get_image_size.
  • Associate external libraries with the object files that actually use them