Don't mix up \0 and NULL, fatal with clang 15

This commit is contained in:
jca 2023-01-10 13:24:10 +00:00
parent 30ca2a1db4
commit 2e5abf8044
2 changed files with 5 additions and 4 deletions

View File

@ -1,7 +1,7 @@
COMMENT= get images from USB cameras using the OV511(+) chipsets
DISTNAME= vid-1.0.1
REVISION= 5
REVISION= 6
CATEGORIES= graphics
HOMEPAGE= http://ovtvid-bsd.sourceforge.net/

View File

@ -1,5 +1,6 @@
--- vid.c.orig Mon May 8 06:59:03 2000
+++ vid.c Tue Apr 26 15:50:06 2016
Index: vid.c
--- vid.c.orig
+++ vid.c
@@ -37,7 +37,7 @@
#include <dev/usb/usb.h>
@ -254,7 +255,7 @@
+ /* there is a dot */
+ plen = strlen(p);
+ snprintf(isocdev, sizeof(isocdev), "%s", devname);
+ isocdev[slen - plen] = NULL;
+ isocdev[slen - plen] = '\0';
+ snprintf(isocdev, sizeof(isocdev), "%s.01", isocdev);
+ }
+