t3900: add some more quotes
[gitweb.git] / credential-cache--daemon.c
index 291c0fd5e935b5abedc629697d44e5a9f57727bd..46c5937526a53c3563ea47bfba8195bcf9352c35 100644 (file)
@@ -179,12 +179,12 @@ static int serve_cache_loop(int fd)
 
                client = accept(fd, NULL, NULL);
                if (client < 0) {
-                       warning("accept failed: %s", strerror(errno));
+                       warning_errno("accept failed");
                        return 1;
                }
                client2 = dup(client);
                if (client2 < 0) {
-                       warning("dup failed: %s", strerror(errno));
+                       warning_errno("dup failed");
                        close(client);
                        return 1;
                }
@@ -219,11 +219,11 @@ static void serve_cache(const char *socket_path, int debug)
        close(fd);
 }
 
-static const char permissions_advice[] =
+static const char permissions_advice[] = N_(
 "The permissions on your socket directory are too loose; other\n"
 "users may be able to read your cached credentials. Consider running:\n"
 "\n"
-"      chmod 0700 %s";
+"      chmod 0700 %s");
 static void init_socket_directory(const char *path)
 {
        struct stat st;
@@ -232,7 +232,7 @@ static void init_socket_directory(const char *path)
 
        if (!stat(dir, &st)) {
                if (st.st_mode & 077)
-                       die(permissions_advice, dir);
+                       die(_(permissions_advice), dir);
        } else {
                /*
                 * We must be sure to create the directory with the correct mode,
@@ -257,7 +257,7 @@ static void init_socket_directory(const char *path)
        free(path_copy);
 }
 
-int main(int argc, const char **argv)
+int cmd_main(int argc, const char **argv)
 {
        const char *socket_path;
        int ignore_sighup = 0;