*
* A few endianness-aware macros for reading and writing data from in-memory
* buffers.
- *
- * Copyright (C) 2012 Eric Biggers
- *
- * wimlib - Library for working with WIM files
- *
- * This library is free software; you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option) any
- * later version.
- *
- * This library is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License along
- * with this library; if not, write to the Free Software Foundation, Inc., 59
- * Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _WIMLIB_IO_H
return p + num_bytes;
}
+static inline u8 *put_zeroes(u8 *p, size_t num_bytes)
+{
+ return (u8*)memset(p, 0, num_bytes) + num_bytes;
+}
+
static inline u8 *put_bytes(u8 *p, size_t num_bytes, const u8 *input)
{
- memcpy(p, input, num_bytes);
- return p + num_bytes;
+ return (u8*)memcpy(p, input, num_bytes) + num_bytes;
}
#endif /* _WIMLIB_IO_H */