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

file: add default implementations for inode types #182

Merged
merged 1 commit into from
Dec 6, 2023

Conversation

Gottox
Copy link
Owner

@Gottox Gottox commented Dec 6, 2023

This change adds default implementations for all inode getters that where just a NULL-pointer beforehand. This hardens the library against misusage and allows to gracefully return error codes and very large values that would trigger errors if used instead of segfaulting.

Copy link

codecov bot commented Dec 6, 2023

Codecov Report

Attention: 18 lines in your changes are missing coverage. Please review.

Comparison is base (de34387) 62.63% compared to head (82a0940) 62.40%.

❗ Current head 82a0940 differs from pull request most recent head 331714c. Consider uploading reports for the commit 331714c to get more accurate results

Files Patch % Lines
libsqsh/src/file/inode_null.c 10.00% 18 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #182      +/-   ##
==========================================
- Coverage   62.63%   62.40%   -0.23%     
==========================================
  Files          67       68       +1     
  Lines        4988     5006      +18     
  Branches      734      733       -1     
==========================================
  Hits         3124     3124              
- Misses       1440     1458      +18     
  Partials      424      424              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

This change adds default implementations for all inode getters that
where just a NULL-pointer beforehand. This hardens the library against
misusage and allows to gracefully return error codes and very large
values that would trigger errors if used instead of segfaulting.
@Gottox Gottox force-pushed the improve/file-default-implementations branch from 82a0940 to 331714c Compare December 6, 2023 21:38
Copy link

sonarcloud bot commented Dec 6, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@Gottox Gottox merged commit f3e6792 into main Dec 6, 2023
27 checks passed
@Gottox Gottox deleted the improve/file-default-implementations branch December 6, 2023 21:43
This pull request was closed.
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