Skip to content

fix: replace magic buffer size 256 with named constant LINUX_BUF_LEN#2329

Open
riteshdhurwey wants to merge 1 commit intobrndnmtthws:mainfrom
riteshdhurwey:fix/replace-magic-buf-size-with-constant
Open

fix: replace magic buffer size 256 with named constant LINUX_BUF_LEN#2329
riteshdhurwey wants to merge 1 commit intobrndnmtthws:mainfrom
riteshdhurwey:fix/replace-magic-buf-size-with-constant

Conversation

@riteshdhurwey
Copy link
Copy Markdown

Summary

Replace hardcoded magic number 256 with a named constant LINUX_BUF_LEN = 512
for buffer sizes in linux.cc.

Changes

  • Added static constexpr int LINUX_BUF_LEN = 512
  • Replaced all char buf[256] with char buf[LINUX_BUF_LEN] in linux.cc
  • Resolves two FIXME comments about arbitrary buffer size

Testing

Built and tested on Arch Linux. Zero compiler warnings.

@netlify
Copy link
Copy Markdown

netlify bot commented Mar 10, 2026

Deploy Preview for conkyweb canceled.

Name Link
🔨 Latest commit 94a0560
🔍 Latest deploy log https://app.netlify.com/projects/conkyweb/deploys/69b01168595e700008601528

@github-actions github-actions bot added sources PR modifies project sources os: linux related exclusively to Linux (not BSD/MacOS) labels Mar 10, 2026
@brndnmtthws brndnmtthws added the LLM Likely LLM slop label Mar 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

LLM Likely LLM slop os: linux related exclusively to Linux (not BSD/MacOS) sources PR modifies project sources

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants