Skip to content

Commit

Permalink
net/mlx5: Replace strcpy with strscpy
Browse files Browse the repository at this point in the history
Replace deprecated strcpy with strscpy.

Signed-off-by: Moshe Shemesh <moshe@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://lore.kernel.org/r/20240613210036.1125203-4-tariqt@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Moshe Shemesh authored and Jakub Kicinski committed Jun 15, 2024
1 parent 49d37d0 commit f070d42
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -3353,9 +3353,9 @@ static int mlx5_fs_mode_get(struct devlink *devlink, u32 id,
struct mlx5_core_dev *dev = devlink_priv(devlink);

if (dev->priv.steering->mode == MLX5_FLOW_STEERING_MODE_SMFS)
strcpy(ctx->val.vstr, "smfs");
strscpy(ctx->val.vstr, "smfs", sizeof(ctx->val.vstr));
else
strcpy(ctx->val.vstr, "dmfs");
strscpy(ctx->val.vstr, "dmfs", sizeof(ctx->val.vstr));
return 0;
}

Expand Down

0 comments on commit f070d42

Please sign in to comment.