mirror of
https://git.ryujinx.app/projects/Kenji-NX.git
synced 2026-10-06 02:58:57 +02:00
misc: chore: Remove redundant code
This commit is contained in:
@@ -14,7 +14,7 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd
|
||||
{
|
||||
[Service("bsd:s", true)]
|
||||
[Service("bsd:u", false)]
|
||||
class IClient : IpcService
|
||||
class IClient(ServiceCtx context, bool isPrivileged) : IpcService(context.Device.System.BsdServer)
|
||||
{
|
||||
private static readonly List<IPollManager> _pollManagers =
|
||||
[
|
||||
@@ -23,12 +23,6 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd
|
||||
];
|
||||
|
||||
private BsdContext _context;
|
||||
private readonly bool _isPrivileged;
|
||||
|
||||
public IClient(ServiceCtx context, bool isPrivileged) : base(context.Device.System.BsdServer)
|
||||
{
|
||||
_isPrivileged = isPrivileged;
|
||||
}
|
||||
|
||||
private ResultCode WriteBsdResult(ServiceCtx context, int result, LinuxError errorCode = LinuxError.SUCCESS)
|
||||
{
|
||||
@@ -79,7 +73,7 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd
|
||||
{
|
||||
return WriteBsdResult(context, -1, LinuxError.EPROTONOSUPPORT);
|
||||
}
|
||||
else if ((type == BsdSocketType.Seqpacket || type == BsdSocketType.Raw) && !_isPrivileged)
|
||||
else if ((type == BsdSocketType.Seqpacket || type == BsdSocketType.Raw) && !isPrivileged)
|
||||
{
|
||||
if (domain != BsdAddressFamily.InterNetwork || type != BsdSocketType.Raw || protocol != ProtocolType.Icmp)
|
||||
{
|
||||
@@ -1040,7 +1034,7 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd
|
||||
LinuxError errno = LinuxError.ENOENT;
|
||||
int newSockFd = -1;
|
||||
|
||||
if (_isPrivileged)
|
||||
if (isPrivileged)
|
||||
{
|
||||
errno = LinuxError.SUCCESS;
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using Ryujinx.Common.Logging;
|
||||
using Ryujinx.HLE.HOS.Services.Ldn.UserServiceCreator.LdnRyu.Proxy;
|
||||
using Ryujinx.HLE.HOS.Services.Sockets.Bsd.Types;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Nsd
|
||||
private readonly FqdnResolver _fqdnResolver;
|
||||
#pragma warning restore IDE0052
|
||||
|
||||
private readonly bool _isInitialized = false;
|
||||
private readonly bool _isInitialized;
|
||||
|
||||
public IManager(ServiceCtx context)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user