]> Sergey Matveev's repositories - tofuproxy.git/blobdiff - cmd/zstd/enzstd.c
Remove redundant ";"
[tofuproxy.git] / cmd / zstd / enzstd.c
index fa63e3682a5e19f9b459ee488f9e97c1c9965d69..33f0b8d791a3b85d7fef949a8f94b414b92f7748 100644 (file)
@@ -36,17 +36,17 @@ main(int argc, char **argv)
     if (ctx == NULL) {
         fputs("can not initialize ZSTD_createCCtx\n", stderr);
         return EXIT_FAILURE;
-    };
+    }
     size_t zCode = ZSTD_CCtx_setParameter(ctx, ZSTD_c_checksumFlag, 1);
     if (ZSTD_isError(zCode)) {
         fprintf(stderr, "can not setParameter: %s\n", ZSTD_getErrorName(zCode));
         return EXIT_FAILURE;
-    };
+    }
     zCode = ZSTD_CCtx_setParameter(ctx, ZSTD_c_compressionLevel, ZSTD_maxCLevel());
     if (ZSTD_isError(zCode)) {
         fprintf(stderr, "can not setParameter: %s\n", ZSTD_getErrorName(zCode));
         return EXIT_FAILURE;
-    };
+    }
 
     char *src      = NULL;
     char *dst      = NULL;
@@ -56,7 +56,7 @@ main(int argc, char **argv)
     if (src == NULL) {
         fprintf(stderr, "can not allocate memory: %zu\n", srcSize);
         goto Exit;
-    };
+    }
     size_t dstSize     = 0;
     size_t srcWantSize = 0;
     size_t dstWantSize = 0;
@@ -66,10 +66,10 @@ main(int argc, char **argv)
         if (n < 8) {
             if (feof(stdin)) {
                 break;
-            };
+            }
             perror("can not fread(stdin)");
             goto Exit;
-        };
+        }
         srcWantSize = (size_t)be64dec(src);
         if (srcWantSize > srcSize) {
             free(src);
@@ -78,13 +78,13 @@ main(int argc, char **argv)
             if (src == NULL) {
                 fprintf(stderr, "can not allocate memory: %zu\n", srcSize);
                 goto Exit;
-            };
-        };
+            }
+        }
         n = fread(src, 1, srcWantSize, stdin);
         if (n < srcWantSize) {
             fputs("insufficient data fed\n", stderr);
             goto Exit;
-        };
+        }
         dstWantSize = ZSTD_compressBound(srcWantSize);
         if (dstWantSize > dstSize) {
             free(dst);
@@ -93,19 +93,19 @@ main(int argc, char **argv)
             if (dst == NULL) {
                 fprintf(stderr, "can not allocate memory: %zu\n", dstSize);
                 goto Exit;
-            };
-        };
+            }
+        }
         zCode = ZSTD_compress2(ctx, dst, dstSize, src, srcWantSize);
         if (ZSTD_isError(zCode)) {
             fprintf(stderr, "can not compress: %s\n", ZSTD_getErrorName(zCode));
             goto Exit;
-        };
+        }
         n = fwrite(dst, 1, zCode, stdout);
         if (n < zCode) {
             perror("can not fwrite(stdout)");
             goto Exit;
-        };
-    };
+        }
+    }
     rc = EXIT_SUCCESS;
 
 Exit:
@@ -113,4 +113,4 @@ Exit:
     free(src);
     ZSTD_freeCCtx(ctx);
     return rc;
-};
+}