diff options
author | rbuj <[email protected]> | 2021-12-14 14:59:36 +0100 |
---|---|---|
committer | mbkma <[email protected]> | 2022-03-19 11:26:13 +0100 |
commit | c54cb9f338830e3d8b7afdc7c7110ecdf946313f (patch) | |
tree | cb7e2f2de07b41505d1cf2bd452d57d757547373 /savers | |
parent | b269d8c14d898f81574fb11af8bd8ea15208fc1d (diff) | |
download | mate-screensaver-c54cb9f338830e3d8b7afdc7c7110ecdf946313f.tar.bz2 mate-screensaver-c54cb9f338830e3d8b7afdc7c7110ecdf946313f.tar.xz |
xdg-user-dir-lookup: Fix -Wshorten-64-to-32 warning
Diffstat (limited to 'savers')
-rw-r--r-- | savers/xdg-user-dir-lookup.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/savers/xdg-user-dir-lookup.c b/savers/xdg-user-dir-lookup.c index 83e2c7e..3a563c7 100644 --- a/savers/xdg-user-dir-lookup.c +++ b/savers/xdg-user-dir-lookup.c @@ -40,7 +40,6 @@ xdg_user_dir_lookup (const char *type) char buffer[512]; char *user_dir; char *p, *d; - int len; int relative; home_dir = getenv ("HOME"); @@ -71,8 +70,8 @@ xdg_user_dir_lookup (const char *type) while (fgets (buffer, sizeof (buffer), file)) { /* Remove newline at end */ - len = strlen (buffer); - if (len > 0 && buffer[len-1] == '\n') + size_t len = strlen (buffer); + if (len != 0 && buffer[len-1] == '\n') buffer[len-1] = 0; p = buffer; |