Skip to content
Snippets Groups Projects

inspect-library: various fixes

Merged Simon McVittie requested to merge wip/smcv/inspect-library-fixes into master
All threads resolved!

While looking into whether we could support deb-symbols(5) in inspect-library, I noticed some weirdness in the parser.

  • inspect-library: Make memory management more obvious

    We were relying on the fact that strsep(&line, ...) resets line to NULL when it reaches the end, which is not at all obvious. Swap the roles of the variables around.

  • inspect-library: Reuse a buffer between iterations

    There's no point in freeing the buffer every time: getline() is designed to reuse it.

  • inspect-library: Allow just a symbol on a line, with no @

    Previously, we would have accepted this as not a parse error, and then crashed with strcmp(NULL, ...) when we tried to use it.

    It obviously ought to mean the same thing as @Base, so treat it the same.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Simon McVittie resolved all discussions

    resolved all discussions

  • Please register or sign in to reply
    Loading