summaryrefslogtreecommitdiffstats
path: root/OpenFilesScreen.c
diff options
context:
space:
mode:
Diffstat (limited to 'OpenFilesScreen.c')
-rw-r--r--OpenFilesScreen.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/OpenFilesScreen.c b/OpenFilesScreen.c
index e33f2e76..ae511c83 100644
--- a/OpenFilesScreen.c
+++ b/OpenFilesScreen.c
@@ -83,7 +83,7 @@ static OpenFiles_ProcessData* OpenFilesScreen_getProcessData(pid_t pid) {
char command[1025];
snprintf(command, 1024, "lsof -P -p %d -F 2> /dev/null", pid);
FILE* fd = popen(command, "r");
- OpenFiles_ProcessData* pdata = calloc(sizeof(OpenFiles_ProcessData), 1);
+ OpenFiles_ProcessData* pdata = calloc(1, sizeof(OpenFiles_ProcessData));
OpenFiles_FileData* fdata = NULL;
OpenFiles_ProcessData* item = pdata;
bool anyRead = false;
@@ -104,7 +104,7 @@ static OpenFiles_ProcessData* OpenFilesScreen_getProcessData(pid_t pid) {
char* newline = strrchr(entry, '\n');
*newline = '\0';
if (cmd == 'f') {
- OpenFiles_FileData* nextFile = calloc(sizeof(OpenFiles_ProcessData), 1);
+ OpenFiles_FileData* nextFile = calloc(1, sizeof(OpenFiles_ProcessData));
if (fdata == NULL) {
pdata->files = nextFile;
} else {