aboutsummaryrefslogtreecommitdiff
path: root/ssh-push.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-07-03 10:10:45 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-03 10:10:45 -0700
commit6da4016aea2dc5bf311fea160bd8ef96ca82b999 (patch)
tree24f35b804286e5d0b86df471f5c48b339507f221 /ssh-push.c
parent44c9e8594e7854fcead68ae0959e00137c2bbb59 (diff)
downloadgit-6da4016aea2dc5bf311fea160bd8ef96ca82b999.tar.gz
git-6da4016aea2dc5bf311fea160bd8ef96ca82b999.tar.xz
Fix sparse warnings.
Mainly making a lot of local functions and variables be marked "static", but there was a "zero as NULL" warning in there too.
Diffstat (limited to 'ssh-push.c')
-rw-r--r--ssh-push.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/ssh-push.c b/ssh-push.c
index db69c889e..090d6f9f8 100644
--- a/ssh-push.c
+++ b/ssh-push.c
@@ -4,10 +4,10 @@
#include <string.h>
-unsigned char local_version = 1;
-unsigned char remote_version = 0;
+static unsigned char local_version = 1;
+static unsigned char remote_version = 0;
-int serve_object(int fd_in, int fd_out) {
+static int serve_object(int fd_in, int fd_out) {
ssize_t size;
int posn = 0;
unsigned char sha1[20];
@@ -57,7 +57,7 @@ int serve_object(int fd_in, int fd_out) {
return 0;
}
-int serve_version(int fd_in, int fd_out)
+static int serve_version(int fd_in, int fd_out)
{
if (read(fd_in, &remote_version, 1) < 1)
return -1;
@@ -65,7 +65,7 @@ int serve_version(int fd_in, int fd_out)
return 0;
}
-int serve_ref(int fd_in, int fd_out)
+static int serve_ref(int fd_in, int fd_out)
{
char ref[PATH_MAX];
unsigned char sha1[20];
@@ -86,7 +86,7 @@ int serve_ref(int fd_in, int fd_out)
}
-void service(int fd_in, int fd_out) {
+static void service(int fd_in, int fd_out) {
char type;
int retval;
do {