]> andersk Git - moira.git/blobdiff - update/xfer_003.c
Code style cleanup. (No functional changes)
[moira.git] / update / xfer_003.c
index f1aa25924ce2a8b5d8dc064f2cc8849de3b3d48f..78069983f2d9f2c9ffc4d23b90de766498ae75e8 100644 (file)
@@ -46,51 +46,52 @@ extern int have_authorization, have_file, done;
  * this version of transfer encrypts the file being transferred.
  */
 
-int
-xfer_003(str)
-    char *str;
+int xfer_003(char *str)
 {
-    int file_size;
-    int checksum;
-    char *pathname;
-    
-    str += 8;
-    while (*str == ' ')
-       str++;
-    if (!*str) {
+  int file_size;
+  int checksum;
+  char *pathname;
+
+  str += 8;
+  while (*str == ' ')
+    str++;
+  if (!*str)
+    {
     failure:
-       reject_call(MR_ARGS);
-       return(0);
+      reject_call(MR_ARGS);
+      return 0;
     }
-    file_size = atoi(str);
-    while (isdigit(*str))
-       str++;
-    while (*str == ' ')
-       str++;
-    checksum = atoi(str);
-    while (isdigit(*str))
-       str++;
-    while (*str == ' ')
-       str++;
-    if (*str != '/')
-       goto failure;
-    pathname = str;
-    if (!have_authorization) {
-       reject_call(MR_PERM);
-       return(0);
+  file_size = atoi(str);
+  while (isdigit(*str))
+    str++;
+  while (*str == ' ')
+    str++;
+  checksum = atoi(str);
+  while (isdigit(*str))
+    str++;
+  while (*str == ' ')
+    str++;
+  if (*str != '/')
+    goto failure;
+  pathname = str;
+  if (!have_authorization)
+    {
+      reject_call(MR_PERM);
+      return 0;
     }
-    if (done)                  /* re-initialize data */
-       initialize();
-    code = send_ok();
-    if (code)
-       lose("sending ok for file xfer (2)");
-    code = get_file(pathname, file_size, checksum, 0444, 1);
-    if (!code) {
-       char buf[BUFSIZ];
-       have_file = 1;
-       strcpy(buf, "transferred file ");
-       strcat(buf, pathname);
-       mr_log_info(buf);
+  if (done)                    /* re-initialize data */
+    initialize();
+  code = send_ok();
+  if (code)
+    lose("sending ok for file xfer (2)");
+  code = get_file(pathname, file_size, checksum, 0444, 1);
+  if (!code)
+    {
+      char buf[BUFSIZ];
+      have_file = 1;
+      strcpy(buf, "transferred file ");
+      strcat(buf, pathname);
+      mr_log_info(buf);
     }
-    return(0);
+  return 0;
 }
This page took 0.039972 seconds and 4 git commands to generate.