ls: use bool

Use the C99 "bool" data type instead of "int".
This commit is contained in:
Max Kellermann 2008-12-16 21:18:33 +01:00
parent 1d82edc6d3
commit d0024c077d
2 changed files with 7 additions and 6 deletions

View File

@ -42,19 +42,18 @@ void printRemoteUrlHandlers(struct client *client)
}
}
int isRemoteUrl(const char *url)
bool isRemoteUrl(const char *url)
{
int count = 0;
const char **urlPrefixes = remoteUrlPrefixes;
while (*urlPrefixes) {
count++;
if (g_str_has_prefix(url, *urlPrefixes))
return count;
return true;
urlPrefixes++;
}
return 0;
return false;
}
/* suffixes should be ascii only characters */

View File

@ -21,12 +21,14 @@
#include "decoder_list.h"
#include <stdbool.h>
struct stat;
struct client;
const char *getSuffix(const char *utf8file);
int isRemoteUrl(const char *url);
bool isRemoteUrl(const char *url);
const struct decoder_plugin *
hasMusicSuffix(const char *utf8file, unsigned int next);