# C backend: fix memset for loop lowering · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/0f65cc9275cde61fe20f28e4f059c8af4c63b051)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 0f65cc9275cde61fe20f28e4f059c8af4c63b051

Requested commit: 0f65cc9275cde61fe20f28e4f059c8af4c63b051

Commit: 0f65cc9275cde61fe20f28e4f059c8af4c63b051

Tree: 7c3d3382a95906f7f1529c5536f25f5f6827ab7f

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
C backend: fix memset for loop lowering

Previously, this code casted the array pointer to u8 pointer, but I
removed that in a different commit. This commit restores the cast, but
instead of hard-coding u8, it uses the destination element pointer,
since memset now supports arbitrary element types.

```

## Parents

- [057c950093085e392fcdd6d6c8e7fb4356dd9959](https://git.cafe/gitcafe/zig/commit/057c950093085e392fcdd6d6c8e7fb4356dd9959?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/0f65cc9275cde61fe20f28e4f059c8af4c63b051?format=markdown)
