cleaning and bug fix
authorLaurent Mazet <laurent.mazet@thalesgroup.com>
Fri, 9 Dec 2022 13:45:37 +0000 (14:45 +0100)
committerLaurent Mazet <laurent.mazet@thalesgroup.com>
Fri, 9 Dec 2022 13:45:37 +0000 (14:45 +0100)
compress.c

index ea65038032707bf22d3ea6396221d19cba6ab0ef..713fc5b0b94b415e6cfaa74db3a918da74d370e1 100644 (file)
@@ -27,7 +27,6 @@ char *progname = NULL;
 
 int usage (int ret)
 {
-    //int fd = ret ? STDERR_FILENO : STDOUT_FILENO;
     int fd = ret ? _fderr : _fdout;
     fdprintf (fd, "usage: %s\n", progname);
     fdprintf (fd, " -h : help message\n");
@@ -38,14 +37,8 @@ int usage (int ret)
     return ret;
 }
 
-void blkcpy (void *dst, const void *src, int len)
-{
-    while (len--) {
-        *((char *)dst++) = *((char *)src++);
-    }
-}
-
 /* create occurence table */
+
 int *create_table (char *filename)
 {
     byte_t buffer[BUFFER_SIZE] = {0};
@@ -58,7 +51,7 @@ int *create_table (char *filename)
     /* open file */
     fid = open (filename, O_RDONLY|O_RAW);
     if (fid == -1) {
-        VERBOSE (ERROR, PRINTERR ("can't open file '%s'\n", filename/);
+        VERBOSE (ERROR, PRINTERR ("can't open file '%s'\n", filename));
         return NULL;
     }
     VERBOSE (INFO, PRINTOUT ("file '%s' opened\n", filename));