[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libguestfs] [PATCH] NFC: Cleanup iteration over fstab entries in inspect_fs_unix.c



On 11/25/2011 10:25 AM, Matthew Booth wrote:
Select non-comment labels using an augeas path to return the correct nodes in
the first instance, rather than applying a regular expression to all results.
Iterate over returned matches using a char** iterator.
Use asprintf() to ensure the path string buffer is the correct size.
---
  src/inspect_fs_unix.c |   50 +++++++++++++++++++++---------------------------
  1 files changed, 22 insertions(+), 28 deletions(-)


I just noticed this doesn't have any changes in it :) It's genuinely coming up in a sec.

I went back to using a buffer on the stack, but added error checking. Also note that spec and md were already being freed as necessary on the error paths. That code didn't change.

Matt
--
Matthew Booth, RHCA, RHCSS
Red Hat Engineering, Virtualisation Team

GPG ID:  D33C3490
GPG FPR: 3733 612D 2D05 5458 8A8A 1600 3441 EA19 D33C 3490


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]