summaryrefslogtreecommitdiff
path: root/clients/zwrite
diff options
context:
space:
mode:
authorGravatar Greg Hudson <ghudson@mit.edu>2002-05-22 11:13:51 +0000
committerGravatar Greg Hudson <ghudson@mit.edu>2002-05-22 11:13:51 +0000
commit9d1a57b5f2298913bc38069ddcd7b1666aad0b30 (patch)
treef9a4ce3391cddf4d97b0c6f36411cf4686938fc9 /clients/zwrite
parent62fdb5f5c83610105b53e8967ab55ccd868995f8 (diff)
Fix send_off() loop so that it only runs once when there are no
targets, even if the loop body does a "continue".
Diffstat (limited to 'clients/zwrite')
-rw-r--r--clients/zwrite/zwrite.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/clients/zwrite/zwrite.c b/clients/zwrite/zwrite.c
index 5edc779..f5dba36 100644
--- a/clients/zwrite/zwrite.c
+++ b/clients/zwrite/zwrite.c
@@ -348,7 +348,7 @@ send_off(notice, real)
success = 0;
- for (i=0;i<nrecips || !nrecips;i++) {
+ for (i=0;i<nrecips || i==0;i++) {
if (realm) {
sprintf(realm_recip, "%s@%s", (nrecips) ? recips[i] : "", realm);
notice->z_recipient = realm_recip;
@@ -439,8 +439,6 @@ send_off(notice, real)
else
printf("Internal failure - illegal message field in server response\n");
ZFreeNotice(&retnotice);
- if (!nrecips)
- break;
}
if (!success)
exit(1);