Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/lpr/common_source change a typo in sizeof(struct qu...



details:   https://anonhg.NetBSD.org/src/rev/edf44ef8ce61
branches:  trunk
changeset: 374800:edf44ef8ce61
user:      andvar <andvar%NetBSD.org@localhost>
date:      Sat May 13 11:48:19 2023 +0000

description:
change a typo in sizeof(struct queueue *) to sizeof(nqueue[0])
riastradh recommends using array[0] instead of pointer.

diffstat:

 usr.sbin/lpr/common_source/common.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 5e7a46276c89 -r edf44ef8ce61 usr.sbin/lpr/common_source/common.c
--- a/usr.sbin/lpr/common_source/common.c       Sat May 13 11:30:27 2023 +0000
+++ b/usr.sbin/lpr/common_source/common.c       Sat May 13 11:48:19 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: common.c,v 1.43 2014/12/20 13:15:48 prlw1 Exp $        */
+/*     $NetBSD: common.c,v 1.44 2023/05/13 11:48:19 andvar Exp $       */
 
 /*
  * Copyright (c) 1983, 1993
@@ -39,7 +39,7 @@
 #if 0
 static char sccsid[] = "@(#)common.c   8.5 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: common.c,v 1.43 2014/12/20 13:15:48 prlw1 Exp $");
+__RCSID("$NetBSD: common.c,v 1.44 2023/05/13 11:48:19 andvar Exp $");
 #endif
 #endif /* not lint */
 
@@ -285,7 +285,7 @@ getq(struct queue **namelist[])
                                goto errdone;
                        }
                        (void)memset(&nqueue[arraysz], 0,
-                           arraysz * sizeof(struct queueue *));
+                           arraysz * sizeof(nqueue[0]));
                        queue = nqueue;
                        arraysz *= 2;
                }



Home | Main Index | Thread Index | Old Index