Skip to content
Snippets Groups Projects

inspect-library: various fixes

Merged Simon McVittie requested to merge wip/smcv/inspect-library-fixes into master

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

Pipeline #1289 passed

Pipeline passed for 010b78c1 on wip/smcv/inspect-library-fixes

Merged by Simon McVittieSimon McVittie 5 years ago (Jul 29, 2019 1:01pm UTC)

Loading

Pipeline #1291 passed

Pipeline passed for 39c10151 on master

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading