Skip to content

Commit 47d0b60

Browse files
author
Michael Paquier
committed
Fix some code indentation
1 parent ea89ca3 commit 47d0b60

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

data.c

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ backup_data_file(const char *from_root, const char *to_root,
9797
return false;
9898

9999
elog(ERROR_SYSTEM, "cannot open backup mode file \"%s\": %s",
100-
file->path, strerror(errno));
100+
file->path, strerror(errno));
101101
}
102102

103103
/* open backup file for write */
@@ -111,7 +111,7 @@ backup_data_file(const char *from_root, const char *to_root,
111111
int errno_tmp = errno;
112112
fclose(in);
113113
elog(ERROR_SYSTEM, "cannot open backup file \"%s\": %s",
114-
to_path, strerror(errno_tmp));
114+
to_path, strerror(errno_tmp));
115115
}
116116

117117
/* confirm server version */
@@ -161,7 +161,7 @@ backup_data_file(const char *from_root, const char *to_root,
161161
fclose(in);
162162
fclose(out);
163163
elog(ERROR_SYSTEM, "cannot write at block %u of \"%s\": %s",
164-
blknum, to_path, strerror(errno_tmp));
164+
blknum, to_path, strerror(errno_tmp));
165165
}
166166

167167
/* update CRC */
@@ -177,7 +177,7 @@ backup_data_file(const char *from_root, const char *to_root,
177177
fclose(in);
178178
fclose(out);
179179
elog(ERROR_SYSTEM, "cannot read backup mode file \"%s\": %s",
180-
file->path, strerror(errno_tmp));
180+
file->path, strerror(errno_tmp));
181181
}
182182

183183
/*
@@ -221,7 +221,7 @@ backup_data_file(const char *from_root, const char *to_root,
221221
fclose(in);
222222
fclose(out);
223223
elog(ERROR_SYSTEM, "cannot write at block %u of \"%s\": %s",
224-
blknum, to_path, strerror(errno_tmp));
224+
blknum, to_path, strerror(errno_tmp));
225225
}
226226

227227
COMP_CRC32C(crc, page.data, read_len);
@@ -240,7 +240,7 @@ backup_data_file(const char *from_root, const char *to_root,
240240
fclose(in);
241241
fclose(out);
242242
elog(ERROR_SYSTEM, "cannot change mode of \"%s\": %s", file->path,
243-
strerror(errno_tmp));
243+
strerror(errno_tmp));
244244
}
245245

246246
fclose(in);
@@ -259,7 +259,7 @@ backup_data_file(const char *from_root, const char *to_root,
259259
{
260260
if (remove(to_path) == -1)
261261
elog(ERROR_SYSTEM, "cannot remove file \"%s\": %s", to_path,
262-
strerror(errno));
262+
strerror(errno));
263263
return false;
264264
}
265265

@@ -297,7 +297,7 @@ restore_data_file(const char *from_root,
297297
if (in == NULL)
298298
{
299299
elog(ERROR_SYSTEM, "cannot open backup file \"%s\": %s", file->path,
300-
strerror(errno));
300+
strerror(errno));
301301
}
302302

303303
/*
@@ -314,7 +314,7 @@ restore_data_file(const char *from_root,
314314
int errno_tmp = errno;
315315
fclose(in);
316316
elog(ERROR_SYSTEM, "cannot open restore target file \"%s\": %s",
317-
to_path, strerror(errno_tmp));
317+
to_path, strerror(errno_tmp));
318318
}
319319

320320
for (blknum = 0; ; blknum++)
@@ -334,21 +334,21 @@ restore_data_file(const char *from_root,
334334
else if (read_len != 0 && feof(in))
335335
{
336336
elog(ERROR_CORRUPTED,
337-
"odd size page found at block %u of \"%s\"",
338-
blknum, file->path);
337+
"odd size page found at block %u of \"%s\"",
338+
blknum, file->path);
339339
}
340340
else
341341
{
342342
elog(ERROR_SYSTEM, "cannot read block %u of \"%s\": %s",
343-
blknum, file->path, strerror(errno_tmp));
343+
blknum, file->path, strerror(errno_tmp));
344344
}
345345
}
346346

347347
if (header.block < blknum || header.hole_offset > BLCKSZ ||
348348
(int) header.hole_offset + (int) header.hole_length > BLCKSZ)
349349
{
350350
elog(ERROR_CORRUPTED, "backup is broken at block %u",
351-
blknum);
351+
blknum);
352352
}
353353

354354
upper_offset = header.hole_offset + header.hole_length;
@@ -361,7 +361,7 @@ restore_data_file(const char *from_root,
361361
fread(page.data + upper_offset, 1, upper_length, in) != upper_length)
362362
{
363363
elog(ERROR_SYSTEM, "cannot read block %u of \"%s\": %s",
364-
blknum, file->path, strerror(errno));
364+
blknum, file->path, strerror(errno));
365365
}
366366

367367
/*
@@ -371,10 +371,10 @@ restore_data_file(const char *from_root,
371371
blknum = header.block;
372372
if (fseek(out, blknum * BLCKSZ, SEEK_SET) < 0)
373373
elog(ERROR_SYSTEM, "cannot seek block %u of \"%s\": %s",
374-
blknum, to_path, strerror(errno));
374+
blknum, to_path, strerror(errno));
375375
if (fwrite(page.data, 1, sizeof(page), out) != sizeof(page))
376376
elog(ERROR_SYSTEM, "cannot write block %u of \"%s\": %s",
377-
blknum, file->path, strerror(errno));
377+
blknum, file->path, strerror(errno));
378378
}
379379

380380
/* update file permission */
@@ -384,7 +384,7 @@ restore_data_file(const char *from_root,
384384
fclose(in);
385385
fclose(out);
386386
elog(ERROR_SYSTEM, "cannot change mode of \"%s\": %s", to_path,
387-
strerror(errno_tmp));
387+
strerror(errno_tmp));
388388
}
389389

390390
fclose(in);
@@ -421,7 +421,7 @@ copy_file(const char *from_root, const char *to_root, pgFile *file)
421421
return false;
422422

423423
elog(ERROR_SYSTEM, "cannot open source file \"%s\": %s", file->path,
424-
strerror(errno));
424+
strerror(errno));
425425
}
426426

427427
/* open backup file for write */
@@ -435,7 +435,7 @@ copy_file(const char *from_root, const char *to_root, pgFile *file)
435435
int errno_tmp = errno;
436436
fclose(in);
437437
elog(ERROR_SYSTEM, "cannot open destination file \"%s\": %s",
438-
to_path, strerror(errno_tmp));
438+
to_path, strerror(errno_tmp));
439439
}
440440

441441
/* stat source file to change mode of destination file */
@@ -444,7 +444,7 @@ copy_file(const char *from_root, const char *to_root, pgFile *file)
444444
fclose(in);
445445
fclose(out);
446446
elog(ERROR_SYSTEM, "cannot stat \"%s\": %s", file->path,
447-
strerror(errno));
447+
strerror(errno));
448448
}
449449

450450
/* copy content and calc CRC */
@@ -460,7 +460,7 @@ copy_file(const char *from_root, const char *to_root, pgFile *file)
460460
fclose(in);
461461
fclose(out);
462462
elog(ERROR_SYSTEM, "cannot write to \"%s\": %s", to_path,
463-
strerror(errno_tmp));
463+
strerror(errno_tmp));
464464
}
465465
/* update CRC */
466466
COMP_CRC32C(crc, buf, read_len);
@@ -475,7 +475,7 @@ copy_file(const char *from_root, const char *to_root, pgFile *file)
475475
fclose(in);
476476
fclose(out);
477477
elog(ERROR_SYSTEM, "cannot read backup mode file \"%s\": %s",
478-
file->path, strerror(errno_tmp));
478+
file->path, strerror(errno_tmp));
479479
}
480480

481481
/* copy odd part. */
@@ -488,7 +488,7 @@ copy_file(const char *from_root, const char *to_root, pgFile *file)
488488
fclose(in);
489489
fclose(out);
490490
elog(ERROR_SYSTEM, "cannot write to \"%s\": %s", to_path,
491-
strerror(errno_tmp));
491+
strerror(errno_tmp));
492492
}
493493
/* update CRC */
494494
COMP_CRC32C(crc, buf, read_len);
@@ -508,7 +508,7 @@ copy_file(const char *from_root, const char *to_root, pgFile *file)
508508
fclose(in);
509509
fclose(out);
510510
elog(ERROR_SYSTEM, "cannot change mode of \"%s\": %s", to_path,
511-
strerror(errno_tmp));
511+
strerror(errno_tmp));
512512
}
513513

514514
fclose(in);

0 commit comments

Comments
 (0)