pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/pkgtools/check-portability pkgtools/check-portability:...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/8386d0c548c9
branches:  trunk
changeset: 412983:8386d0c548c9
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Sat Mar 14 09:18:49 2020 +0000

description:
pkgtools/check-portability: update to 19.4.3

Changes since 19.4.2:

Fixed a crash when a file started with an empty line.

diffstat:

 pkgtools/check-portability/Makefile                  |  4 ++--
 pkgtools/check-portability/files/check-portability.c |  5 ++---
 pkgtools/check-portability/files/testdata/empty-line |  3 +++
 3 files changed, 7 insertions(+), 5 deletions(-)

diffs (38 lines):

diff -r 929f6494b593 -r 8386d0c548c9 pkgtools/check-portability/Makefile
--- a/pkgtools/check-portability/Makefile       Sat Mar 14 08:02:46 2020 +0000
+++ b/pkgtools/check-portability/Makefile       Sat Mar 14 09:18:49 2020 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.6 2020/03/13 16:20:34 rillig Exp $
+# $NetBSD: Makefile,v 1.7 2020/03/14 09:18:49 rillig Exp $
 
-PKGNAME=       check-portability-19.4.2
+PKGNAME=       check-portability-19.4.3
 CATEGORIES=    pkgtools
 DISTFILES=     # none
 
diff -r 929f6494b593 -r 8386d0c548c9 pkgtools/check-portability/files/check-portability.c
--- a/pkgtools/check-portability/files/check-portability.c      Sat Mar 14 08:02:46 2020 +0000
+++ b/pkgtools/check-portability/files/check-portability.c      Sat Mar 14 09:18:49 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: check-portability.c,v 1.9 2020/03/13 16:43:05 rillig Exp $ */
+/* $NetBSD: check-portability.c,v 1.10 2020/03/14 09:18:49 rillig Exp $ */
 
 /*
  Copyright (c) 2020 Roland Illig
@@ -171,8 +171,7 @@
 static cstr
 str_c(str *s)
 {
-       assert(s->data != nullptr);
-       return (cstr) { s->data, s->len };
+       return (cstr) { s->data == nullptr ? "" : s->data, s->len };
 }
 
 static void
diff -r 929f6494b593 -r 8386d0c548c9 pkgtools/check-portability/files/testdata/empty-line
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/pkgtools/check-portability/files/testdata/empty-line      Sat Mar 14 09:18:49 2020 +0000
@@ -0,0 +1,3 @@
+
+On 2020-03-14, check-portability crashed on files that started with an
+empty line. This file ensures that this doesn't happen again.



Home | Main Index | Thread Index | Old Index