]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Spelling fixes
authorGraham Percival <gperciva@tarsnap.com>
Fri, 2 Nov 2018 21:16:56 +0000 (14:16 -0700)
committerGraham Percival <gperciva@tarsnap.com>
Fri, 2 Nov 2018 21:22:08 +0000 (14:22 -0700)
Sponsored by: Tarsnap Backup Inc.

libarchive/archive_read_support_format_rar5.c
libarchive/test/test_fuzz.c
libarchive/test/test_write_disk_perms.c

index a4479f5a4a7b12228aca978249ac71ee86c02924..aa72792808af96ff4d7b42db7b270225a23d50bc 100644 (file)
@@ -176,7 +176,7 @@ struct comp_state {
                                     decompression. */
     uint8_t* filtered_buf;       /* Buffer used when applying filters. */
     const uint8_t* block_buf;    /* Buffer used when merging blocks. */
-    size_t window_mask;          /* Convinience field; window_size - 1. */
+    size_t window_mask;          /* Convenience field; window_size - 1. */
     int64_t write_ptr;           /* This amount of data has been unpacked in
                                     the window buffer. */
     int64_t last_write_ptr;      /* This amount of data has been stored in
@@ -279,7 +279,7 @@ struct rar5 {
     int skip_mode;
 
     /* An offset to QuickOpen list. This is not supported by this unpacker,
-     * becuase we're focusing on streaming interface. QuickOpen is designed
+     * because we're focusing on streaming interface. QuickOpen is designed
      * to make things quicker for non-stream interfaces, so it's not our
      * use case. */
     uint64_t qlist_offset;
@@ -387,7 +387,7 @@ static void cdeque_pop_front_fast(struct cdeque* d, void** value) {
     d->size--;
 }
 
-/* Pops a front element of this cicrular deque object and returns its value.
+/* Pops a front element of this circular deque object and returns its value.
  * This function performs bounds checking. */
 static int cdeque_pop_front(struct cdeque* d, void** value) {
     if(!d || !value)
@@ -400,17 +400,17 @@ static int cdeque_pop_front(struct cdeque* d, void** value) {
     return CDE_OK;
 }
 
-/* Convinience function to cast filter_info** to void **. */
+/* Convenience function to cast filter_info** to void **. */
 static void** cdeque_filter_p(struct filter_info** f) {
     return (void**) (size_t) f;
 }
 
-/* Convinience function to cast filter_info* to void *. */
+/* Convenience function to cast filter_info* to void *. */
 static void* cdeque_filter(struct filter_info* f) {
     return (void**) (size_t) f;
 }
 
-/* Destroys this circular deque object. Dellocates the memory of the collection
+/* Destroys this circular deque object. Deallocates the memory of the collection
  * buffer, but doesn't deallocate the memory of any pointer passed to this
  * deque as a value. */
 static void cdeque_free(struct cdeque* d) {
@@ -434,7 +434,7 @@ static inline struct rar5* get_context(struct archive_read* a) {
 
 // TODO: make sure these functions return a little endian number
 
-/* Convinience functions used by filter implementations. */
+/* Convenience functions used by filter implementations. */
 
 static uint32_t read_filter_data(struct rar5* rar, uint32_t offset) {
     uint32_t* dptr = (uint32_t*) &rar->cstate.window_buf[offset];
@@ -672,7 +672,7 @@ static void push_data(struct archive_read* a, struct rar5* rar,
     }
 }
 
-/* Convinience function that submits the data to the user. It uses the
+/* Convenience function that submits the data to the user. It uses the
  * unpack window buffer as a source location. */
 static void push_window_data(struct archive_read* a, struct rar5* rar,
         int64_t idx_begin, int64_t idx_end)
@@ -753,7 +753,7 @@ static void free_filters(struct rar5* rar) {
 
     /* Free any remaining filters. All filters should be naturally consumed by
      * the unpacking function, so remaining filters after unpacking normally
-     * mean that unpacking wasn't successfull. But still of course we shouldn't
+     * mean that unpacking wasn't successful. But still of course we shouldn't
      * leak memory in such case. */
 
     /* cdeque_size() is a fast operation, so we can use it as a loop
@@ -885,7 +885,7 @@ static int read_var(struct archive_read* a, uint64_t* pvalue,
                  * it will not have the possibility to advance the file
                  * pointer, because it will not know how many bytes it needs
                  * to consume. This is why we handle such situation here
-                 * autmatically. */
+                 * automatically. */
                 if(ARCHIVE_OK != consume(a, 1 + i)) {
                     return 0;
                 }
@@ -1522,7 +1522,7 @@ static int process_head_main(struct archive_read* a, struct rar5* rar,
 
     enum MAIN_FLAGS {
         VOLUME = 0x0001,         /* multi-volume archive */
-        VOLUME_NUMBER = 0x0002,  /* volume number, first vol doesnt have it */
+        VOLUME_NUMBER = 0x0002,  /* volume number, first vol doesn't have it */
         SOLID = 0x0004,          /* solid archive */
         PROTECT = 0x0008,        /* contains Recovery info */
         LOCK = 0x0010,           /* readonly flag, not used */
@@ -2211,7 +2211,7 @@ static int parse_block_header(struct archive_read* a, const uint8_t* p,
     return ARCHIVE_OK;
 }
 
-/* Convinience function used during filter processing. */
+/* Convenience function used during filter processing. */
 static int parse_filter_data(struct rar5* rar, const uint8_t* p,
         uint32_t* filter_data)
 {
@@ -3186,7 +3186,7 @@ static int verify_checksums(struct archive_read* a) {
      * data and discarding the result). */
 
     if(!rar->skip_mode) {
-        /* Always check checkums if we're not in skip mode */
+        /* Always check checksums if we're not in skip mode */
         verify_crc = 1;
     } else {
         /* We can override the logic above with a compile-time option
index 42351450b26530ed2f43310b679de83480204415..2025834ca424147da7dae2818a2feda69a5d34a9 100644 (file)
@@ -433,7 +433,7 @@ DEFINE_TEST(test_fuzz_tar)
                {0, fileset9}, /* Exercise lzo decompressor. */
 #endif
 #if HAVE_ZSTD_H && HAVE_LIBZSTD
-               {0, fileset10}, /* Excercise zstd decompressor. */
+               {0, fileset10}, /* Exercise zstd decompressor. */
 #endif
                {1, NULL}
        };
index 8205d6abc59a36e3b7a10def7172be5ef1b24711..81f8b1209ce1ebf2bbce77a966dd259959bf4fe2 100644 (file)
@@ -203,7 +203,7 @@ DEFINE_TEST(test_write_disk_perms)
        failure("dir_overwrite_0744: st.st_mode=%o", st.st_mode);
        assertEqualInt(st.st_mode & 0777, 0744);
 
-       /* For dir, the owner should get left when not overwritting. */
+       /* For dir, the owner should get left when not overwriting. */
        assertMakeDir("dir_owner", 0744);
 
        if (getuid() == 0) {