- f_csums = do_open(filename, O_RDONLY, 0);
- if (f_csums < 0) {
- rprintf(FERROR, "Batch file %s open error: %s\n",
- filename, strerror(errno));
- close(f_csums);
- exit_cleanup(1);
- }
- }
-
- bytes_read = read(f_csums, buff, len);
- if (bytes_read < 0) {
- rprintf(FERROR, "Batch file %s read error: %s\n",
- filename, strerror(errno));
+ if ((bytes_read = read(f_csums, buff, len)) < 0) {
+ rprintf(FERROR, "Batch file read error: %s\n",
+ strerror(errno));