Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not use regexp #3460

Merged
merged 2 commits into from Feb 6, 2023
Merged

Do not use regexp #3460

merged 2 commits into from Feb 6, 2023

Commits on Dec 16, 2022

  1. libct: validateID: stop using regexp

    Replace a regex with a simple for loop. Document the function.
    
    Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
    kolyshkin committed Dec 16, 2022
    Configuration menu
    Copy the full SHA
    b44da4c View commit details
    Browse the repository at this point in the history
  2. libct/cg/sd: stop using regex, fix systemdVersionAtoi

    Rewrite systemdVersionAtoi to not use regexp, and fix two issues:
    
    1. It was returning 0 (rather than -1) for some errors.
    
    2. The comment was saying that the input string is without quotes,
       while in fact it is.
    
    Note the new function, similar to the old one, works on input either
    with or without quotes. Amend the test to add test cases without quotes.
    
    Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
    kolyshkin committed Dec 16, 2022
    Configuration menu
    Copy the full SHA
    0ac9880 View commit details
    Browse the repository at this point in the history