diff options
-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; |