Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc411a8c

Browse files
committed
refactoring. remove unused move_file(), remove_trailing_space(), remove_not_digit() functions
1 parent109af56 commitc411a8c

File tree

2 files changed

+3
-43
lines changed

2 files changed

+3
-43
lines changed

‎src/pg_probackup.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -622,8 +622,9 @@ extern void restore_data_file(const char *to_path,
622622
pgFile*file,boolallow_truncate,
623623
boolwrite_header,
624624
uint32backup_version);
625-
externboolcopy_file(constchar*from_root,fio_locationfrom_location,constchar*to_root,fio_locationto_location,pgFile*file);
626-
externvoidmove_file(constchar*from_root,constchar*to_root,pgFile*file);
625+
externboolcopy_file(constchar*from_root,fio_locationfrom_location,
626+
constchar*to_root,fio_locationto_location,
627+
pgFile*file);
627628

628629
externboolcheck_file_pages(pgFile*file,XLogRecPtrstop_lsn,
629630
uint32checksum_version,uint32backup_version);
@@ -659,11 +660,8 @@ extern void set_min_recovery_point(pgFile *file, const char *backup_path,
659660
externvoidcopy_pgcontrol_file(constchar*from_root,fio_locationlocation,constchar*to_root,fio_locationto_location,
660661
pgFile*file);
661662

662-
externvoidsanityChecks(void);
663663
externvoidtime2iso(char*buf,size_tlen,time_ttime);
664664
externconstchar*status2str(BackupStatusstatus);
665-
externvoidremove_trailing_space(char*buf,intcomment_mark);
666-
externvoidremove_not_digit(char*buf,size_tlen,constchar*str);
667665
externconstchar*base36enc(long unsignedintvalue);
668666
externchar*base36enc_dup(long unsignedintvalue);
669667
externlong unsignedintbase36dec(constchar*text);

‎src/util.c

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -457,41 +457,3 @@ status2str(BackupStatus status)
457457

458458
returnstatusName[status];
459459
}
460-
461-
void
462-
remove_trailing_space(char*buf,intcomment_mark)
463-
{
464-
inti;
465-
char*last_char=NULL;
466-
467-
for (i=0;buf[i];i++)
468-
{
469-
if (buf[i]==comment_mark||buf[i]=='\n'||buf[i]=='\r')
470-
{
471-
buf[i]='\0';
472-
break;
473-
}
474-
}
475-
for (i=0;buf[i];i++)
476-
{
477-
if (!isspace(buf[i]))
478-
last_char=buf+i;
479-
}
480-
if (last_char!=NULL)
481-
*(last_char+1)='\0';
482-
483-
}
484-
485-
void
486-
remove_not_digit(char*buf,size_tlen,constchar*str)
487-
{
488-
inti,j;
489-
490-
for (i=0,j=0;str[i]&&j<len;i++)
491-
{
492-
if (!isdigit(str[i]))
493-
continue;
494-
buf[j++]=str[i];
495-
}
496-
buf[j]='\0';
497-
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp