Use De Morgan to simplify code
Open
Nobody has claimed this yet.
- Dominant language
- Ada
- Stars
- 17
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
Hi Spawn developers,
Why not use De Morgan to simplify
https://github.com/AdaCore/spawn/blob/9122c2970d6332f3d5db2042e19fdd4abffd186a/source/spawn/spawn-processes-windows.adb#L691-L692
into
if (Self.Status /= Not_Running)
or else (dwErrorCode /= Windows_API.ERROR_OPERATION_ABORTED)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open source/spawn/spawn-processes-windows.adb at lines 691-692 and inspect the existing condition in context. Replace it with the De Morgan form shown in the issue, preserving the existing status and Windows error checks. Done means the condition is simplified without changing its behavior.
Written by the indexing model from the issue text.
Assessment
- Domain
- operating-systems
- Issue type
- Refactor
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100
