diff options
| author | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2023-03-16 02:23:05 +0100 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2023-03-16 02:23:05 +0100 |
| commit | 9624e8114408b96ac96675191ae2e34b0e403ee1 (patch) | |
| tree | b970b8a3246f73b374e0294b7787352721a5753c | |
| parent | fa474603ccaa1a50d258b82ee51e2bc9275ba8b9 (diff) | |
| download | slcl-9624e8114408b96ac96675191ae2e34b0e403ee1.tar.gz | |
main.c: Fix undefined value for cur
As otherwise reported by clang 14.0.0:
main.c:679:14: warning: variable 'cur' is used uninitialized whenever '&&' condition is false [-Wsometimes-uninitialized]
else if (available && quota_current(a, username, &cur))
This was a minor issue after all, as pq was not used unless available
were set.
| -rw-r--r-- | main.c | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -682,11 +682,12 @@ static int getnode(const struct http_payload *const p, goto end; } - const struct page_quota pq = - { - .cur = cur, - .max = max - }, *const ppq = available ? &pq : NULL; + const struct page_quota *const ppq = available ? + &(const struct page_quota) + { + .cur = cur, + .max = max + } : NULL; ret = page_resource(r, dir.str, root.str, d.str, ppq); |
