diff options
author | 2016-10-07 00:17:20 +0000 | |
---|---|---|
committer | 2016-10-07 00:17:20 +0000 | |
commit | af3988eab0cbe91cc22b1958b1ae836d5129addc (patch) | |
tree | adaee4fcc6ca21e1fdb183eb4046ddd45adfcb24 | |
parent | - better check for seckeyname/pubkeyname "equality", remove the path (diff) | |
download | wireguard-openbsd-af3988eab0cbe91cc22b1958b1ae836d5129addc.tar.xz wireguard-openbsd-af3988eab0cbe91cc22b1958b1ae836d5129addc.zip |
Switch a SLIST_FOREACH loop containing SLIST_REMOVE to SLIST_FOREACH_SAFE.
ok lum@ sunil@
-rw-r--r-- | usr.bin/mg/dired.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/mg/dired.c b/usr.bin/mg/dired.c index 33cfc57a5fb..dde2d59adec 100644 --- a/usr.bin/mg/dired.c +++ b/usr.bin/mg/dired.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dired.c,v 1.82 2016/01/02 10:39:19 lum Exp $ */ +/* $OpenBSD: dired.c,v 1.83 2016/10/07 00:17:20 jsg Exp $ */ /* This file is in the public domain. */ @@ -939,7 +939,7 @@ dired_(char *dname) void redelete(struct buffer *bp) { - struct delentry *d1 = NULL; + struct delentry *dt, *d1 = NULL; struct line *lp, *nlp; char fname[NFILEN]; char *p = fname; @@ -956,7 +956,7 @@ redelete(struct buffer *bp) continue; } plen = strlen(p); - SLIST_FOREACH(d1, &delhead, entry) { + SLIST_FOREACH_SAFE(d1, &delhead, entry, dt) { fnlen = strlen(d1->fn); if ((plen == fnlen) && (strncmp(p, d1->fn, plen) == 0)) { |