comparison dbutil.c @ 1453:336cae2238ca

test close < 0, from Marco Wenzel
author Matt Johnston <matt@ucc.asn.au>
date Wed, 18 Oct 2017 22:41:27 +0800
parents bbc0a0ee3843
children 4afde04f0607 fb90a5ba84e0
comparison
equal deleted inserted replaced
1452:15d4b821bcc9 1453:336cae2238ca
504 504
505 /* make sure that the socket closes */ 505 /* make sure that the socket closes */
506 void m_close(int fd) { 506 void m_close(int fd) {
507 int val; 507 int val;
508 508
509 if (fd == -1) { 509 if (fd < 0) {
510 return; 510 return;
511 } 511 }
512 512
513 do { 513 do {
514 val = close(fd); 514 val = close(fd);