binwalk: fix warning

This commit is contained in:
Đoàn Trần Công Danh 2022-12-18 00:13:55 +07:00
parent 6a69f5d08a
commit b86538424f
2 changed files with 23 additions and 1 deletions

View File

@ -0,0 +1,22 @@
Index: binwalk-2.3.3/src/binwalk/modules/extractor.py
===================================================================
--- binwalk-2.3.3.orig/src/binwalk/modules/extractor.py
+++ binwalk-2.3.3/src/binwalk/modules/extractor.py
@@ -966,7 +966,7 @@ class Extractor(Module):
# Fork a child process
child_pid = os.fork()
- if child_pid is 0:
+ if child_pid == 0:
# Switch to the run-as user privileges, if one has been set
if self.runas_uid is not None and self.runas_gid is not None:
os.setgid(self.runas_uid)
@@ -981,7 +981,7 @@ class Extractor(Module):
rval = subprocess.call(shlex.split(command), stdout=tmp, stderr=tmp)
# A true child process should exit with the subprocess exit value
- if child_pid is 0:
+ if child_pid == 0:
sys.exit(rval)
# If no os.fork() happened, just return the subprocess exit value
elif child_pid is None:

View File

@ -1,7 +1,7 @@
# Template file for 'binwalk'
pkgname=binwalk
version=2.3.3
revision=2
revision=3
build_style=python3-module
hostmakedepends="python3"
depends="python3"