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

Commit 100e53d

Browse files
committed
fix log print & change size to unsigned long long
1 parent 8637bf0 commit 100e53d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

‎ssu_rsync.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@ void renewal_tar(int count)
552552
char path[MAX_BUFFER_SIZE] = { 0 };
553553
char command[MAX_BUFFER_SIZE] = { 0 };
554554
struct stat statbuf;
555-
int size;
555+
unsigned long long size;
556556

557557
if (count == 0) {
558558
fprintf(stderr, "write_log(): already up to date in %s\n", dst_path);
@@ -629,7 +629,7 @@ void renewal_tar(int count)
629629
* @brief 로그 파일 작성
630630
* @param count 변경 사항 개수
631631
*/
632-
void write_log(int count, int totalsize) // 로그 파일 작성
632+
void write_log(int count, unsigned long long totalsize) // 로그 파일 작성
633633
{
634634
FILE *fp;
635635
time_t now_t;
@@ -664,7 +664,7 @@ void write_log(int count, int totalsize) // 로그 파일 작성
664664
fprintf(fp, "[%.24s] %s\n", asctime(now_tm), command); // 헤더 라인 쓰기
665665

666666
if (option_t)
667-
fprintf(fp, " totalsize %dbytes\n", totalsize);
667+
fprintf(fp, " totalsize %llubytes\n", totalsize);
668668

669669
for (int i = 0; i < count; i++) // 변경 사항 쓰기
670670
switch (change_list[i].status) {

‎ssu_rsync.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ int count_size(file_node *head); // 디렉토리 크기 반환
4646
void compare_list(file_node *src_list, file_node *dst_list); // 파일 목록 트리 비교
4747
bool compare_file(file_node *src_file, file_node *dst_file); // 파일 정보 비교
4848
int write_change_list(file_node *head, int idx, int status, bool is_first); // 변경사항 목록 작성
49-
void write_log(int count, int totalsize); // 로그 파일 작성
49+
void write_log(int count, unsigned long long totalsize); // 로그 파일 작성
5050
void free_list(file_node *head); // 파일 목록 메모리 할당 해제
5151
void renewal(int count); // 파일 동기화
5252
void renewal_tar(int count); // tar 동기화

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /