~sircmpwn/public-inbox

scdoc: Fix static analyzer warnings v1 APPLIED

This is one of few issues discovered with static analyzer.

Viacheslav Kruglov (1):
  Fix logical error in comparison with ULONG_MAX

 src/main.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

-- 
2.45.2
#1348750 .build.yml success
scdoc/patches/.build.yml: SUCCESS in 12s

[Fix static analyzer warnings][0] from [~rvoid][1]

[0]: https://lists.sr.ht/~sircmpwn/public-inbox/patches/55434
[1]: mailto:me@hograthm.com

✓ #1348750 SUCCESS scdoc/patches/.build.yml https://builds.sr.ht/~sircmpwn/job/1348750
Thanks!

To git@git.sr.ht:~sircmpwn/scdoc
   3667cce..b0ea10a  master -> master
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~sircmpwn/public-inbox/patches/55434/mbox | git am -3
Learn more about email & git

[PATCH scdoc 1/1] Fix logical error in comparison with ULONG_MAX Export this patch

From: Viacheslav Kruglov <me@hograthm.com>

The expression `epoch > ULONG_MAX` will always return false because
`epoch` is of type `unsigned long long`.
---
 src/main.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/main.c b/src/main.c
index 4591098..fa733c3 100644
--- a/src/main.c
+++ b/src/main.c
@@ -96,10 +96,10 @@ static void parse_preamble(struct parser *p) {
					endptr);
			exit(EXIT_FAILURE);
		}
		if (epoch > ULONG_MAX) {
		if (epoch > ULLONG_MAX) {
			fprintf(stderr, "$SOURCE_DATE_EPOCH: value must be smaller than or "
					"equal to %lu but was found to be: %llu \n",
					ULONG_MAX, epoch);
					"equal to %llu but was found to be: %llu \n",
					ULLONG_MAX, epoch);
			exit(EXIT_FAILURE);
		}
		date_time = epoch;
-- 
2.45.2
scdoc/patches/.build.yml: SUCCESS in 12s

[Fix static analyzer warnings][0] from [~rvoid][1]

[0]: https://lists.sr.ht/~sircmpwn/public-inbox/patches/55434
[1]: mailto:me@hograthm.com

✓ #1348750 SUCCESS scdoc/patches/.build.yml https://builds.sr.ht/~sircmpwn/job/1348750
Thanks!

To git@git.sr.ht:~sircmpwn/scdoc
   3667cce..b0ea10a  master -> master