Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-4]: src/usr.sbin/pkg_install/lib Pull up revision 1.2:
details: https://anonhg.NetBSD.org/src/rev/e80097aef343
branches: netbsd-1-4
changeset: 469392:e80097aef343
user: he <he%NetBSD.org@localhost>
date: Mon Sep 13 22:32:16 1999 +0000
description:
Pull up revision 1.2:
Bring closer to /usr/share/misc/style with the aid of indent(1). (hubertf)
diffstat:
usr.sbin/pkg_install/lib/lpkg.c | 32 +++++++++++++++++---------------
1 files changed, 17 insertions(+), 15 deletions(-)
diffs (59 lines):
diff -r 7c589b4660ac -r e80097aef343 usr.sbin/pkg_install/lib/lpkg.c
--- a/usr.sbin/pkg_install/lib/lpkg.c Mon Sep 13 22:30:42 1999 +0000
+++ b/usr.sbin/pkg_install/lib/lpkg.c Mon Sep 13 22:32:16 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lpkg.c,v 1.1 1999/03/22 05:02:41 hubertf Exp $ */
+/* $NetBSD: lpkg.c,v 1.1.2.1 1999/09/13 22:32:16 he Exp $ */
/*
* Copyright (c) 1999 Christian E. Hopps
@@ -32,33 +32,35 @@
#include <err.h>
#include "lib.h"
-/* add a package to the recursive delete list */
+/*
+ * Add a package to the recursive delete list
+ */
lpkg_t *
alloc_lpkg(const char *pkgname)
{
- lpkg_t *lpp;
+ lpkg_t *lpp;
- if ((lpp = malloc(sizeof(*lpp))) == 0)
- err(1, "cannot allocate recursion data");
- if ((lpp->lp_name = strdup(pkgname)) == 0)
- err(1, "cannot allocate recursion data");
- return (lpp);
+ if ((lpp = malloc(sizeof(*lpp))) == 0)
+ err(1, "cannot allocate recursion data");
+ if ((lpp->lp_name = strdup(pkgname)) == 0)
+ err(1, "cannot allocate recursion data");
+ return (lpp);
}
void
free_lpkg(lpkg_t *lpp)
{
- free(lpp->lp_name);
- free(lpp);
+ free(lpp->lp_name);
+ free(lpp);
}
lpkg_t *
find_on_queue(lpkg_head_t *qp, const char *name)
{
- lpkg_t *lpp;
+ lpkg_t *lpp;
- for (lpp = TAILQ_FIRST(qp); lpp; lpp = TAILQ_NEXT(lpp, lp_link))
- if (!strcmp(name, lpp->lp_name))
- return (lpp);
- return (0);
+ for (lpp = TAILQ_FIRST(qp); lpp; lpp = TAILQ_NEXT(lpp, lp_link))
+ if (!strcmp(name, lpp->lp_name))
+ return (lpp);
+ return (0);
}
Home |
Main Index |
Thread Index |
Old Index