On 09/11/2014 12:03 PM, Markus Armbruster wrote: > Benoît Canet <benoit.ca...@irqsave.net> writes: > >> The Wednesday 10 Sep 2014 à 10:13:33 (+0200), Markus Armbruster wrote : >>> Make the BlockBackend own the DriveInfo. Change blockdev_init() to >>> return the BlockBackend instead of the DriveInfo. >>> >>> Signed-off-by: Markus Armbruster <arm...@redhat.com> >>> ---
>>> +static void drive_info_del(DriveInfo *dinfo); >> >> Is there any technical reason not to just put the >> drive_info_del above the blk_delete function ? >> I don't see any possible circular references between the two. >> >> Some people like Eric frown upon static function prototypes >> in final code that's why I am asking. I dislike it in code I write, and so I point it out in reviews, but I also concede that it is a style, not technical issue, so I will never reject a patch that uses forward declarations if the author thinks that makes the presentation of the overall file easier to follow. > > Placing functions before their callers makes the program easier to read > when you need to see the functions definition before you can understand > their use. > > Placing the functions after callers makes the program easier to read > when the gist of what they do is obvious from the call. You're omitting > unnecessary detail there, to be flesh it own further down. Saving a > function declaration is immaterial compared to that. > > Before I put the function where I don't want it, I'd inline it :) Then I won't try to convince you to paint the bikeshed any other color. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature