]> git.ipfire.org Git - thirdparty/kmod.git/commit
shared: don't reset errno in read_str_{u,}long()
authorEmil Velikov <emil.l.velikov@gmail.com>
Wed, 7 May 2025 12:18:04 +0000 (13:18 +0100)
committerLucas De Marchi <lucas.de.marchi@gmail.com>
Tue, 20 May 2025 02:51:43 +0000 (21:51 -0500)
commit879e5fabc60b054f14fdd83a764ba4f47814d2a6
tree7fa162c7f075cd405d128c6f3da453b3bfab4ec8
parentfb0e59a12c19a683148cca343e4caec8b2667592
shared: don't reset errno in read_str_{u,}long()

Currently we reset errno prior to calling strto{u,}l(). This is not
needed, since a) we don't check errno to see if the function was
successful and b) we explicitly propagate the error code by returning it
directly to the caller.

Reference: https://github.com/kmod-project/kmod/issues/244
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/346
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
shared/util.c