Remove redundant local assignment in AclCommands#14358
Remove redundant local assignment in AclCommands#14358rjmholt merged 4 commits intoPowerShell:masterfrom
Conversation
Follow-up to PowerShell#14341.
|
@PoshChan please remind me in 1 day |
| // Add CAP names and IDs to a string array. | ||
| string[] policies = new string[capCount]; | ||
| NativeMethods.CENTRAL_ACCESS_POLICY cap = new NativeMethods.CENTRAL_ACCESS_POLICY(); | ||
| NativeMethods.CENTRAL_ACCESS_POLICY cap; |
There was a problem hiding this comment.
I think this can be removed here and instead be defined in the for loop body scope, where it is only used (similar to pCapId)/
There was a problem hiding this comment.
Actually, this code is inside of an if !CORECLR do you still want the change made?
|
|
||
| // Find the supplied string among available CAP names, use the corresponding CAPID. | ||
| NativeMethods.CENTRAL_ACCESS_POLICY cap = new NativeMethods.CENTRAL_ACCESS_POLICY(); | ||
| NativeMethods.CENTRAL_ACCESS_POLICY cap; |
There was a problem hiding this comment.
I think this can be removed here and instead be defined in the for loop body scope, where it is only used.
Addrees @PaulHigin review
|
@PaulHigin I've pushed some more changes on the same theme. |
|
@PoshChan please remind me in 20 hours |
|
@rjmholt, this is the reminder you requested 20 hours ago |
|
@rjmholt, this is the reminder you requested 1 day ago |
|
🎉 Handy links: |


Follow-up to #14341.