diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2002-03-16 01:12:48 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2002-03-16 01:12:48 +0000 |
commit | aab6c3e9e74d546123b5a46c1151dffede4f1bd6 (patch) | |
tree | 62b82697e0a8952ee24eec7b6f64a99fc160695f /usr.bin | |
parent | d78c7c639a88090ea7f566e27fd52b276cb367eb (diff) |
Don't set st->st_offs when st is NULL.
Noted by Gregory Steuck <greg@nest.cx>
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/pmdb/symbol.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.bin/pmdb/symbol.c b/usr.bin/pmdb/symbol.c index 1956bb5da1e..91975e6d1d2 100644 --- a/usr.bin/pmdb/symbol.c +++ b/usr.bin/pmdb/symbol.c @@ -1,4 +1,4 @@ -/* $OpenBSD: symbol.c,v 1.4 2002/03/15 18:04:41 art Exp $ */ +/* $OpenBSD: symbol.c,v 1.5 2002/03/16 01:12:47 art Exp $ */ /* * Copyright (c) 2002 Artur Grabowski <art@openbsd.org> * All rights reserved. @@ -155,10 +155,9 @@ st_open(struct pstate *ps, const char *name, reg offs) if ((st = (*ps->ps_sops->sop_open)(name)) != NULL) { TAILQ_INSERT_TAIL(&ps->ps_syms, st, st_list); strlcpy(st->st_fname, name, sizeof(st->st_fname)); + st->st_offs = offs; } - st->st_offs = offs; - return (st); } |