Source-Changes-HG archive

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

[src/trunk]: src/sbin/rcorder use strnode_add() to implement add_before()



details:   https://anonhg.NetBSD.org/src/rev/b914136700b4
branches:  trunk
changeset: 533446:b914136700b4
user:      lukem <lukem%NetBSD.org@localhost>
date:      Sun Jun 30 13:31:15 2002 +0000

description:
use strnode_add() to implement add_before()

diffstat:

 sbin/rcorder/rcorder.c |  9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)

diffs (24 lines):

diff -r b571f76effc2 -r b914136700b4 sbin/rcorder/rcorder.c
--- a/sbin/rcorder/rcorder.c    Sun Jun 30 13:10:16 2002 +0000
+++ b/sbin/rcorder/rcorder.c    Sun Jun 30 13:31:15 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rcorder.c,v 1.8 2002/04/10 12:38:26 christos Exp $     */
+/*     $NetBSD: rcorder.c,v 1.9 2002/06/30 13:31:15 lukem Exp $        */
 
 /*
  * Copyright (c) 1998, 1999 Matthew R. Green
@@ -367,13 +367,8 @@
        filenode *fnode;
        char *s;
 {
-       strnodelist *bf_ent;
 
-       bf_ent = emalloc(sizeof *bf_ent + strlen(s));
-       bf_ent->node = fnode;
-       strcpy(bf_ent->s, s);
-       bf_ent->next = bl_list;
-       bl_list = bf_ent;
+       strnode_add(&bl_list, s, fnode);
 }
 
 /*



Home | Main Index | Thread Index | Old Index