ifupdown: save some 100+ bytes of code in addstr()
[oweals/busybox.git] / archival / libunarchive / data_align.c
1 /* vi: set sw=4 ts=4: */
2 /*
3  * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
4  */
5
6 #include <sys/types.h>
7
8 #include <errno.h>
9 #include <unistd.h>
10
11 #include "libbb.h"
12 #include "unarchive.h"
13
14 void data_align(archive_handle_t *archive_handle, const unsigned short boundary)
15 {
16         const unsigned short skip_amount = (boundary - (archive_handle->offset % boundary)) % boundary;
17
18         archive_handle->seek(archive_handle, skip_amount);
19         archive_handle->offset += skip_amount;
20
21         return;
22 }