1
- /* $NetBSD: ar_io.c,v 1.56 2015/03/09 23:38:08 sevan Exp $ */
1
+ /* $NetBSD: ar_io.c,v 1.57 2016/05/31 03:32:36 dholland Exp $ */
2
2
3
3
/*-
4
4
* Copyright (c) 1992 Keith Muller.
42
42
#if 0
43
43
static char sccsid [] = "@(#)ar_io.c 8.2 (Berkeley) 4/18/94" ;
44
44
#else
45
- __RCSID ("$NetBSD: ar_io.c,v 1.56 2015/03/09 23:38:08 sevan Exp $" );
45
+ __RCSID ("$NetBSD: ar_io.c,v 1.57 2016/05/31 03:32:36 dholland Exp $" );
46
46
#endif
47
47
#endif /* not lint */
48
48
@@ -1631,7 +1631,6 @@ void
1631
1631
ar_summary (int n )
1632
1632
{
1633
1633
time_t secs ;
1634
- int len ;
1635
1634
char buf [BUFSIZ ];
1636
1635
char tbuf [MAXPATHLEN /4 ]; /* XXX silly size! */
1637
1636
char s1buf [MAXPATHLEN /8 ]; /* XXX very silly size! */
@@ -1657,33 +1656,32 @@ ar_summary(int n)
1657
1656
* could have written anything yet.
1658
1657
*/
1659
1658
if (frmt == NULL && act != COPY ) {
1660
- len = snprintf (buf , sizeof (buf ),
1659
+ snprintf (buf , sizeof (buf ),
1661
1660
"unknown format, %s skipped in %s\n" ,
1662
1661
sizefmt (s1buf , sizeof (s1buf ), rdcnt ),
1663
1662
timefmt (tbuf , sizeof (tbuf ), rdcnt , secs , "bytes" ));
1664
1663
if (n == 0 )
1665
1664
(void )fprintf (outf , "%s: %s" , argv0 , buf );
1666
1665
else
1667
- (void )write (STDERR_FILENO , buf , len );
1666
+ (void )write (STDERR_FILENO , buf , strlen ( buf ) );
1668
1667
return ;
1669
1668
}
1670
1669
1671
1670
1672
1671
if (n != 0 && * archd .name ) {
1673
- len = snprintf (buf , sizeof (buf ), "Working on `%s' (%s)\n" ,
1672
+ snprintf (buf , sizeof (buf ), "Working on `%s' (%s)\n" ,
1674
1673
archd .name , sizefmt (s1buf , sizeof (s1buf ), archd .sb .st_size ));
1675
- (void )write (STDERR_FILENO , buf , len );
1676
- len = 0 ;
1674
+ (void )write (STDERR_FILENO , buf , strlen (buf ));
1677
1675
}
1678
1676
1679
1677
1680
1678
if (act == COPY ) {
1681
- len = snprintf (buf , sizeof (buf ),
1679
+ snprintf (buf , sizeof (buf ),
1682
1680
"%lu files in %s\n" ,
1683
1681
(unsigned long )flcnt ,
1684
1682
timefmt (tbuf , sizeof (tbuf ), flcnt , secs , "files" ));
1685
1683
} else {
1686
- len = snprintf (buf , sizeof (buf ),
1684
+ snprintf (buf , sizeof (buf ),
1687
1685
"%s vol %d, %lu files, %s read, %s written in %s\n" ,
1688
1686
frmt -> name , arvol - 1 , (unsigned long )flcnt ,
1689
1687
sizefmt (s1buf , sizeof (s1buf ), rdcnt ),
0 commit comments