use while(1) and break

git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@32 7ae35d74-ebe9-4afe-98af-79ac388436b8
Hamlib-1.0.0
Frank Singleton, VK3FCS 2000-07-27 01:01:32 +00:00
rodzic ddd49e87f2
commit d594c0415a
1 zmienionych plików z 5 dodań i 2 usunięć

Wyświetl plik

@ -7,7 +7,7 @@
* box (FIF-232C) or similar * box (FIF-232C) or similar
* *
* *
* $Id: ft747.c,v 1.2 2000-07-27 00:43:58 javabear Exp $ * $Id: ft747.c,v 1.3 2000-07-27 01:01:32 javabear Exp $
* *
*/ */
@ -194,9 +194,11 @@ void cmd_update_store(int fd, unsigned char *buffer) {
*/ */
bytes = 0; bytes = 0;
while(bytes < 345) { while(1) {
ioctl(fd, FIONREAD, &bytes); /* get bytes in buffer */ ioctl(fd, FIONREAD, &bytes); /* get bytes in buffer */
printf("bytes = %i\n", bytes); printf("bytes = %i\n", bytes);
if (bytes == 345)
break;
sleep(1); /* wait 1 second */ sleep(1); /* wait 1 second */
} }
@ -215,3 +217,4 @@ void cmd_update_store(int fd, unsigned char *buffer) {