struct stat buf;
char *temp_drift_file;
FILE *out;
+ int r1, r2;
/* Create a temporary file with a '.tmp' extension. */
}
/* Write the frequency and skew parameters in ppm */
- if ((fprintf(out, "%20.6f %20.6f\n", freq_ppm, 1.0e6 * skew) < 0) |
- fclose(out)) {
+ r1 = fprintf(out, "%20.6f %20.6f\n", freq_ppm, 1.0e6 * skew);
+ r2 = fclose(out);
+ if (r1 < 0 || r2) {
Free(temp_drift_file);
LOG(LOGS_WARN, LOGF_Reference, "Could not write to temporary driftfile %s.tmp",
drift_file);
struct stat buf;
char *temp_coefs_file_name;
FILE *out;
+ int r1, r2;
/* Create a temporary file with a '.tmp' extension. */
}
/* Gain rate is written out in ppm */
- if ((fprintf(out, "%1d %ld %.6f %.3f\n",
- valid,ref_time, offset, 1.0e6 * rate) < 0) |
- fclose(out)) {
+ r1 = fprintf(out, "%1d %ld %.6f %.3f\n",
+ valid, ref_time, offset, 1.0e6 * rate);
+ r2 = fclose(out);
+ if (r1 < 0 || r2) {
Free(temp_coefs_file_name);
LOG(LOGS_WARN, LOGF_RtcLinux, "Could not write to temporary RTC file %s.tmp",
coefs_file_name);