mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-14 04:54:37 +03:00
Drop redundant casts to the same type
This commit is contained in:

committed by
cgzones

parent
214c742ae1
commit
843949131a
@ -100,11 +100,11 @@ static ACPresence procAcpiCheck(void) {
|
||||
}
|
||||
|
||||
for (;;) {
|
||||
struct dirent* dirEntry = readdir((DIR *) dir);
|
||||
struct dirent* dirEntry = readdir(dir);
|
||||
if (!dirEntry)
|
||||
break;
|
||||
|
||||
char* entryName = (char *) dirEntry->d_name;
|
||||
const char* entryName = dirEntry->d_name;
|
||||
|
||||
if (entryName[0] != 'A')
|
||||
continue;
|
||||
@ -189,10 +189,10 @@ static void Battery_getSysData(double* level, ACPresence* isOnAC) {
|
||||
unsigned long int totalRemain = 0;
|
||||
|
||||
for (;;) {
|
||||
struct dirent* dirEntry = readdir((DIR *) dir);
|
||||
struct dirent* dirEntry = readdir(dir);
|
||||
if (!dirEntry)
|
||||
break;
|
||||
char* entryName = (char *) dirEntry->d_name;
|
||||
const char* entryName = dirEntry->d_name;
|
||||
char filePath[256];
|
||||
|
||||
xSnprintf(filePath, sizeof filePath, SYS_POWERSUPPLY_DIR "/%s/type", entryName);
|
||||
|
@ -290,7 +290,7 @@ void LinuxProcess_writeField(Process* this, RichString* str, ProcessField field)
|
||||
xSnprintf(buffer, n, "%5lu ", lp->ctxt_diff);
|
||||
break;
|
||||
default:
|
||||
Process_writeField((Process*)this, str, field);
|
||||
Process_writeField(this, str, field);
|
||||
return;
|
||||
}
|
||||
RichString_append(str, attr, buffer);
|
||||
|
@ -232,7 +232,7 @@ static inline unsigned long long LinuxProcess_adjustTime(unsigned long long t) {
|
||||
jiffy = sc_jiffy;
|
||||
}
|
||||
double jiffytime = 1.0 / jiffy;
|
||||
return (unsigned long long) t * jiffytime * 100;
|
||||
return t * jiffytime * 100;
|
||||
}
|
||||
|
||||
static bool LinuxProcessList_readStatFile(Process *process, const char* dirname, const char* name, char* command, int* commLen) {
|
||||
|
Reference in New Issue
Block a user