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

refactor prime_factorization.c #1407

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

isidroas
Copy link

  • fix(prime_factorization.c) memory error
  • Rename the file to correct spelling
  • refactor(prime_factorization.c): reuse code if body

Please, look at the text of the commits

Checklist

  • Added description of change
  • Added file name matches File name guidelines
  • Added tests and example, test must pass
  • Relevant documentation/comments is changed or added
  • PR title follows semantic commit guidelines
  • Search previous suggestions before making a new one, as yours may be a duplicate.
  • I acknowledge that all my contributions will be made under the project's license.

Notes:

There was a naming overlap in `range`

Valgrind error was:

	==43396== Invalid read of size 4
	==43396==    at 0x109610: print_arr (prime_factoriziation.c:141)
	==43396==    by 0x1092D6: main (prime_factoriziation.c:55)
	==43396==  Address 0x4a95938 is 0 bytes after a block of size 8 alloc'd
	==43396==    at 0x4845828: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
	==43396==    by 0x10939D: int_fact (prime_factoriziation.c:69)
	==43396==    by 0x1092B2: main (prime_factoriziation.c:53)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant