git.samba.org
/
rsync.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
916faec
)
A couple minor fixes.
author
Wayne Davison
<wayne@opencoder.net>
Fri, 5 Jun 2020 05:54:38 +0000
(22:54 -0700)
committer
Wayne Davison
<wayne@opencoder.net>
Fri, 5 Jun 2020 05:54:38 +0000
(22:54 -0700)
clientserver.c
patch
|
blob
|
history
main.c
patch
|
blob
|
history
diff --git
a/clientserver.c
b/clientserver.c
index 8df149474f168a0541be2e1e449916756e981359..91f78b7b753f4814b94e1866f78614316feff822 100644
(file)
--- a/
clientserver.c
+++ b/
clientserver.c
@@
-1173,7
+1173,7
@@
static void create_pid_file(void)
fail = "lock";
else if (do_fstat(pid_file_fd, &st1) < 0)
fail = "fstat opened";
fail = "lock";
else if (do_fstat(pid_file_fd, &st1) < 0)
fail = "fstat opened";
- else if (st1.st_size >
=
(int)sizeof pidbuf)
+ else if (st1.st_size > (int)sizeof pidbuf)
fail = "find small";
else if (do_lstat(pid_file, &st2) < 0)
fail = "lstat";
fail = "find small";
else if (do_lstat(pid_file, &st2) < 0)
fail = "lstat";
@@
-1190,7
+1190,7
@@
static void create_pid_file(void)
int len = snprintf(pidbuf, sizeof pidbuf, "%d\n", (int)pid);
#ifndef HAVE_FTRUNCATE
/* What can we do with a too-long file and no truncate? I guess we'll add extra newlines. */
int len = snprintf(pidbuf, sizeof pidbuf, "%d\n", (int)pid);
#ifndef HAVE_FTRUNCATE
/* What can we do with a too-long file and no truncate? I guess we'll add extra newlines. */
- while (len < st1.st_size) /* We already verified that st_size
+1
chars fits in the buffer. */
+ while (len < st1.st_size) /* We already verified that st_size chars fits in the buffer. */
pidbuf[len++] = '\n';
/* We don't need the buffer to end in a '\0' (and we may not have room to add it). */
#endif
pidbuf[len++] = '\n';
/* We don't need the buffer to end in a '\0' (and we may not have room to add it). */
#endif
diff --git
a/main.c
b/main.c
index ed1a210fe32a3ffd82444bd93da745d062be0bbb..98bbaa6872f6fd24babd7c6b850f7ed40676aec5 100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-88,7
+88,6
@@
extern char *partial_dir;
extern char *dest_option;
extern char *rsync_path;
extern char *shell_cmd;
extern char *dest_option;
extern char *rsync_path;
extern char *shell_cmd;
-extern char *batch_name;
extern char *password_file;
extern char *backup_dir;
extern char *copy_as;
extern char *password_file;
extern char *backup_dir;
extern char *copy_as;