mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
lib/cpio: Make find_cpio_data()'s offset arg optional
Some callers don't use it so make it optional. Signed-off-by: Borislav Petkov <[email protected]> Cc: Andy Lutomirski <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: Brian Gerst <[email protected]> Cc: Denys Vlasenko <[email protected]> Cc: H. Peter Anvin <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
This commit is contained in:
1 parent
4b703305d9
commit
7557933e6b
1 file changed
+4
-1
+4
-1
@@ -125,7 +125,10 @@ struct cpio_data find_cpio_data(const char *path, void *data,
|
||||
if ((ch[C_MODE] & 0170000) == 0100000 &&
|
||||
ch[C_NAMESIZE] >= mypathsize &&
|
||||
!memcmp(p, path, mypathsize)) {
|
||||
*nextoff = (long)nptr - (long)data;
|
||||
|
||||
if (nextoff)
|
||||
*nextoff = (long)nptr - (long)data;
|
||||
|
||||
if (ch[C_NAMESIZE] - mypathsize >= MAX_CPIO_FILE_NAME) {
|
||||
pr_warn(
|
||||
"File %s exceeding MAX_CPIO_FILE_NAME [%d]\n",
|
||||
|
||||
Reference in new issue
Block a user