diff options
author | fgsch <fgsch@openbsd.org> | 2012-03-04 04:05:15 +0000 |
---|---|---|
committer | fgsch <fgsch@openbsd.org> | 2012-03-04 04:05:15 +0000 |
commit | f9bbbf4534171e957bb7652e706dd78782fbffa2 (patch) | |
tree | 3828b3cf6a92fdae28d55bf6c8000c490e4996d0 /usr.sbin/netgroup_mkdb | |
parent | Document sem_timedwait() (diff) | |
download | wireguard-openbsd-f9bbbf4534171e957bb7652e706dd78782fbffa2.tar.xz wireguard-openbsd-f9bbbf4534171e957bb7652e706dd78782fbffa2.zip |
In preparation for getline and getdelim additions to libc, rename getline()
occurrences to get_line().
Based on a diff from Jan Klemkow <j-dot-klemkow-at-wemelug-dot-de> to tech.
Diffstat (limited to 'usr.sbin/netgroup_mkdb')
-rw-r--r-- | usr.sbin/netgroup_mkdb/netgroup_mkdb.c | 4 | ||||
-rw-r--r-- | usr.sbin/netgroup_mkdb/util.c | 4 | ||||
-rw-r--r-- | usr.sbin/netgroup_mkdb/util.h | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/netgroup_mkdb/netgroup_mkdb.c b/usr.sbin/netgroup_mkdb/netgroup_mkdb.c index 3f7926abe1c..fad0746e4a9 100644 --- a/usr.sbin/netgroup_mkdb/netgroup_mkdb.c +++ b/usr.sbin/netgroup_mkdb/netgroup_mkdb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: netgroup_mkdb.c,v 1.15 2009/10/27 23:59:53 deraadt Exp $ */ +/* $OpenBSD: netgroup_mkdb.c,v 1.16 2012/03/04 04:05:15 fgsch Exp $ */ /* * Copyright (c) 1994 Christos Zoulas @@ -212,7 +212,7 @@ ng_load(const char *fname) if (db == NULL) err(1, "dbopen"); - while ((buf = getline(fp, &size)) != NULL) { + while ((buf = get_line(fp, &size)) != NULL) { tail = head = NULL; p = buf; diff --git a/usr.sbin/netgroup_mkdb/util.c b/usr.sbin/netgroup_mkdb/util.c index 1b4439d2fdc..065c5022833 100644 --- a/usr.sbin/netgroup_mkdb/util.c +++ b/usr.sbin/netgroup_mkdb/util.c @@ -61,12 +61,12 @@ erealloc(void *p, size_t s) } -/* getline(): +/* get_line(): * Read a line from a file parsing continuations ending in \ * and eliminating trailing newlines. */ char * -getline(FILE *fp, size_t *size) +get_line(FILE *fp, size_t *size) { size_t s, len = 0; char *buf = NULL, *ptr; diff --git a/usr.sbin/netgroup_mkdb/util.h b/usr.sbin/netgroup_mkdb/util.h index 84523a4f422..08ca7d7dfad 100644 --- a/usr.sbin/netgroup_mkdb/util.h +++ b/usr.sbin/netgroup_mkdb/util.h @@ -36,5 +36,5 @@ __BEGIN_DECLS void *emalloc(size_t); void *erealloc(void *, size_t); -char *getline(FILE *, size_t *); +char *get_line(FILE *, size_t *); __END_DECLS |