gpgme-tools: add spaces between function names and arguments.
authorW. Trevor King <wking@tremily.us>
Thu, 11 Oct 2012 16:23:58 +0000 (12:23 -0400)
committerW. Trevor King <wking@tremily.us>
Thu, 11 Oct 2012 18:12:22 +0000 (14:12 -0400)
Signed-off-by: W. Trevor King <wking@tremily.us>
src/gpgme-tool.c

index 556471aaf66bdb1a35ec7b065cf67bde15298155..bcda5f0e90d8531814a1dfdbb33c3b240f86d1fc 100644 (file)
@@ -636,16 +636,16 @@ cleanup_handler (int signum)
 {
        if (socket_fd >= 0)
                {
-                       close(socket_fd);
+                       close (socket_fd);  /* unix only */
                        socket_fd = -1;
                }
        if (socket_path)
                {
-                       unlink(socket_path);
-                       free(socket_path);
+                       unlink (socket_path);
+                       free (socket_path);
                        socket_path = NULL;
                }
-       exit(EXIT_SUCCESS);
+       exit (EXIT_SUCCESS);
 }
 
 void log_error (int status, gpg_error_t errnum,
@@ -3443,19 +3443,19 @@ expand_path(char *raw_path)
                {
                        /* TODO: check for WRDE_BADCHAR, etc. */
                        fprintf (log_stream, "could not expand socket path\n");
-                       exit(EXIT_FAILURE);
+                       exit (EXIT_FAILURE);
                }
        if (words.we_wordc != 1)
                {
                        fprintf (log_stream, "expanded socket path into %d fields\n",
                                 words.we_wordc);
-                       exit(EXIT_FAILURE);
+                       exit (EXIT_FAILURE);
                }
        path = malloc (sizeof(char) * (strlen(words.we_wordv[0]) + 1));
        if (! path)
                {
-                       perror("can't allocate path");
-                       exit(EXIT_FAILURE);
+                       perror ("can't allocate path");
+                       exit (EXIT_FAILURE);
                }
        strcpy (path, words.we_wordv[0]);
 
@@ -3499,31 +3499,31 @@ gpgme_server (gpgme_tool_t gt, int socket_server)
     {
       struct sockaddr_un addr;
 
-      socket_fd = socket(AF_UNIX, SOCK_STREAM, 0);
+      socket_fd = socket (AF_UNIX, SOCK_STREAM, 0);
       if (socket_fd == -1)
       {
-        perror("can't create stream socket");
-        exit(EXIT_FAILURE);
+        perror ("can't create stream socket");
+        exit (EXIT_FAILURE);
       }
 
       addr.sun_family = AF_UNIX;
-                       socket_path = expand_path("~/.gnupg/S.gpgme-tool");
+                       socket_path = expand_path ("~/.gnupg/S.gpgme-tool");
       strcpy (addr.sun_path, socket_path);
 
       if (bind (socket_fd, (struct sockaddr *) &addr, sizeof(struct sockaddr_un)))
         {
-          perror("can't bind to stream socket");
-          exit(EXIT_FAILURE);
+          perror ("can't bind to stream socket");
+          exit (EXIT_FAILURE);
         }
 
-      signal(SIGINT, &cleanup_handler);
-      signal(SIGTERM, &cleanup_handler);
+      signal (SIGINT, &cleanup_handler);
+      signal (SIGTERM, &cleanup_handler);
 
-      listen(socket_fd, 5);
+      listen (socket_fd, 5);
 
       for (;;)
         {
-          sock = accept(socket_fd, NULL, 0);
+          sock = accept (socket_fd, NULL, 0);
           if (sock == -1)
             {
               perror("accept");
@@ -3531,8 +3531,8 @@ gpgme_server (gpgme_tool_t gt, int socket_server)
             }
           if ((pid = fork ()) == -1)
             {
-              perror("fork");
-              close(sock);
+              perror ("fork");
+              close (sock);
                                                        sock = -1;
               continue;
             }
@@ -3544,8 +3544,8 @@ gpgme_server (gpgme_tool_t gt, int socket_server)
         }
 
       /* the child doesn't need cleanup handlers */
-      signal(SIGINT, SIG_DFL);
-      signal(SIGTERM, SIG_DFL);
+      signal (SIGINT, SIG_DFL);
+      signal (SIGTERM, SIG_DFL);
 
       err = assuan_init_socket_server (
         server.assuan_ctx, sock,