Skip to content

Commit 26b64a4

Browse files
committed
fix warning ssu_rsync
1 parent 100e53d commit 26b64a4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ssu_rsync.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ int main(int argc, char *argv[])
167167
chdir(pwd); // 실행 경로로 복귀
168168
signal(SIGINT, recovery); // SIGINT 시그널 처리
169169
syncronize(src_path, dst_path); // 동기화
170-
sprintf(swap_path, "%s.swp", dst_path);
170+
sprintf(swap_path, "%.*s.swp", (int)strlen(dst_path), dst_path);
171171
#ifdef DEBUG
172172
printf("ssu_rsync(): swap_path = %s\n", swap_path);
173173
#endif
@@ -606,7 +606,7 @@ void renewal_tar(int count)
606606
chdir(path);
607607
lstat(file_name, &statbuf); // 상태 정보 획득
608608
size = statbuf.st_size; // 압축 파일 크기 획득
609-
sprintf(path, "%s/%s", dst_path, file_name); // 압축 풀 경로 생성
609+
sprintf(path, "%.*s/%.*s", (int)strlen(dst_path), dst_path, (int)strlen(file_name), file_name); // 압축 풀 경로 생성
610610
rename(file_name, path); // 압축 파일 이동
611611
#ifdef DEBUG
612612
printf("renewal_tar(): cd %s\n", dst_path);

0 commit comments

Comments
 (0)