summary refs log tree commit diff
path: root/bin/fbclock.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2018-01-30 16:25:32 -0500
committerJune McEnroe <june@causal.agency>2018-01-30 16:25:32 -0500
commit2e50ad73149779c6842fa14c271226c0ac049740 (patch)
tree396546d7b3b511204adb5b451c3c8d53d28e7708 /bin/fbclock.c
parentRemove Tarmak and Colemak keylayouts (diff)
downloadsrc-2e50ad73149779c6842fa14c271226c0ac049740.tar.gz
src-2e50ad73149779c6842fa14c271226c0ac049740.zip
Style tweak fbclock
Diffstat (limited to 'bin/fbclock.c')
-rw-r--r--bin/fbclock.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/fbclock.c b/bin/fbclock.c
index a7798b00..3f7b5c71 100644
--- a/bin/fbclock.c
+++ b/bin/fbclock.c
@@ -106,10 +106,10 @@ int main() {
                 buf[bottom * info.xres + x] = FG;
             }
 
-            for (char *s = str; *s; ++s) {
+            for (const char *s = str; *s; ++s) {
                 uint8_t *glyph = glyphs[(uint8_t)*s];
+                uint32_t stride = header.glyphSize / header.glyphHeight;
                 for (uint32_t y = 0; y < header.glyphHeight; ++y) {
-                    uint32_t stride = header.glyphSize / header.glyphHeight;
                     for (uint32_t x = 0; x < header.glyphWidth; ++x) {
                         uint8_t bits = glyph[y * stride + x / 8];
                         uint8_t bit = bits >> (7 - x % 8) & 1;