mirror of
https://github.com/Llewellynvdm/conky.git
synced 2025-02-02 12:08:33 +00:00
Fixed a few minor type issues
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1005 7f574dfc-610e-0410-a909-a81674777703
This commit is contained in:
parent
c96f5b1143
commit
9c3ae23a15
13
src/conky.c
13
src/conky.c
@ -476,7 +476,7 @@ static char text_buffer[TEXT_BUFFER_SIZE * 4];
|
||||
|
||||
#define SPECIAL_CHAR '\x01'
|
||||
|
||||
enum {
|
||||
enum special_types {
|
||||
HORIZONTAL_LINE,
|
||||
STIPPLED_HR,
|
||||
BAR,
|
||||
@ -517,7 +517,7 @@ static unsigned int special_index; /* used when drawing */
|
||||
|
||||
#define MAX_GRAPH_DEPTH 256 /* why 256? cause an array of more then 256 doubles seems excessive, and who needs that kind of precision anyway? */
|
||||
|
||||
static struct special_t *new_special(char *buf, int t)
|
||||
static struct special_t *new_special(char *buf, enum special_types t)
|
||||
{
|
||||
if (special_count >= max_specials)
|
||||
CRIT_ERR("too many special things in text");
|
||||
@ -560,8 +560,7 @@ long fwd_fcharfind(FILE* fp, char val, unsigned int step) {
|
||||
}
|
||||
|
||||
#ifndef HAVE_MEMRCHR
|
||||
void *
|
||||
memrchr (const void *buffer, int c, size_t n)
|
||||
void *memrchr(const void *buffer, char c, size_t n)
|
||||
{
|
||||
const unsigned char *p = buffer;
|
||||
|
||||
@ -593,11 +592,7 @@ long rev_fcharfind(FILE* fp, char val, unsigned int step) {
|
||||
file_pos = ftell(fp);
|
||||
buf_pos = fread(buf, 1, buf_size, fp);
|
||||
}
|
||||
cur_found =
|
||||
memrchr(
|
||||
buf,
|
||||
(int)val,
|
||||
(size_t)buf_pos);
|
||||
cur_found = memrchr(buf, val, (size_t) buf_pos);
|
||||
if(cur_found != NULL) {
|
||||
buf_pos = cur_found-buf;
|
||||
count++;
|
||||
|
@ -354,7 +354,7 @@ update_cpu_usage()
|
||||
double
|
||||
get_sysfs_info(int *fd, int arg, char *devtype, char *type)
|
||||
{
|
||||
return (0);
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
void
|
||||
@ -363,9 +363,9 @@ update_load_average()
|
||||
double v[3];
|
||||
getloadavg(v, 3);
|
||||
|
||||
info.loadavg[0] = (float) v[0];
|
||||
info.loadavg[1] = (float) v[1];
|
||||
info.loadavg[2] = (float) v[2];
|
||||
info.loadavg[0] = (double) v[0];
|
||||
info.loadavg[1] = (double) v[1];
|
||||
info.loadavg[2] = (double) v[2];
|
||||
}
|
||||
|
||||
double
|
||||
|
Loading…
x
Reference in New Issue
Block a user