for (;;) {
tag = ber_get_next( sb, &len, ber);
- if( tag == LBER_ERROR ) {
- if( errno == EWOULDBLOCK ) continue;
- if( errno == EAGAIN ) continue;
- perror( "ber_get_next" );
- return( EXIT_FAILURE );
- }
+ if( tag != LBER_ERROR ) break;
+
+ if( errno == EWOULDBLOCK ) continue;
+ if( errno == EAGAIN ) continue;
+
+ perror( "ber_get_next" );
+ return( EXIT_FAILURE );
+
}
printf("decode: message tag 0x%lx and length %ld\n",
- (unsigned long) tag, (long) len );
+ (unsigned long) tag, (long) len );
for( s = argv[1]; *s; s++ ) {
char buf[128];
*/
if (ber->ber_rwptr == NULL) {
-#if 0
- /* XXYYZ - dtest does like this assert. */
assert( ber->ber_buf == NULL );
-#endif
ber->ber_rwptr = (char *) &ber->ber_len-1;
ber->ber_ptr = ber->ber_rwptr;
ber->ber_tag = 0;