Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/make make(1): remove unused variable from ArchFindMe...
details: https://anonhg.NetBSD.org/src/rev/4b70922e8914
branches: trunk
changeset: 946644:4b70922e8914
user: rillig <rillig%NetBSD.org@localhost>
date: Sat Dec 05 17:17:37 2020 +0000
description:
make(1): remove unused variable from ArchFindMember
diffstat:
usr.bin/make/arch.c | 11 ++++-------
1 files changed, 4 insertions(+), 7 deletions(-)
diffs (39 lines):
diff -r 88374951bd70 -r 4b70922e8914 usr.bin/make/arch.c
--- a/usr.bin/make/arch.c Sat Dec 05 17:12:02 2020 +0000
+++ b/usr.bin/make/arch.c Sat Dec 05 17:17:37 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: arch.c,v 1.184 2020/12/04 14:51:46 rillig Exp $ */
+/* $NetBSD: arch.c,v 1.185 2020/12/05 17:17:37 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -125,7 +125,7 @@
#include "config.h"
/* "@(#)arch.c 8.2 (Berkeley) 1/2/94" */
-MAKE_RCSID("$NetBSD: arch.c,v 1.184 2020/12/04 14:51:46 rillig Exp $");
+MAKE_RCSID("$NetBSD: arch.c,v 1.185 2020/12/05 17:17:37 rillig Exp $");
typedef struct List ArchList;
typedef struct ListNode ArchListNode;
@@ -723,7 +723,7 @@
FILE *arch; /* Stream to archive */
int size; /* Size of archive member */
char magic[SARMAG];
- size_t len, tlen;
+ size_t len;
const char *lastSlash;
arch = fopen(archive, mode);
@@ -748,10 +748,7 @@
if (lastSlash != NULL)
member = lastSlash + 1;
- len = tlen = strlen(member);
- if (len > sizeof out_arh->ar_name) {
- tlen = sizeof out_arh->ar_name;
- }
+ len = strlen(member);
while (fread(out_arh, sizeof *out_arh, 1, arch) == 1) {
Home |
Main Index |
Thread Index |
Old Index