Mercurial > dropbear
comparison dbutil.c @ 1038:d3925ed45a85
Fix for old compilers, variable declarations at beginning of functions
and /**/ comments
author | Thorsten Horstmann <thorsten.horstmann@web.de> |
---|---|
date | Tue, 24 Feb 2015 20:51:18 +0800 |
parents | 4121ca987e6a |
children | 01eea88963f3 |
comparison
equal
deleted
inserted
replaced
1037:7c899f24a85b | 1038:d3925ed45a85 |
---|---|
866 } | 866 } |
867 #endif | 867 #endif |
868 | 868 |
869 /* make sure that the socket closes */ | 869 /* make sure that the socket closes */ |
870 void m_close(int fd) { | 870 void m_close(int fd) { |
871 int val; | |
871 | 872 |
872 if (fd == -1) { | 873 if (fd == -1) { |
873 return; | 874 return; |
874 } | 875 } |
875 | 876 |
876 int val; | |
877 do { | 877 do { |
878 val = close(fd); | 878 val = close(fd); |
879 } while (val < 0 && errno == EINTR); | 879 } while (val < 0 && errno == EINTR); |
880 | 880 |
881 if (val < 0 && errno != EBADF) { | 881 if (val < 0 && errno != EBADF) { |