distroquery.c: fix calloc usage error reported by gcc 14

This commit is contained in:
Silvan Calarco 2024-05-30 11:13:07 +02:00
parent d94eb66440
commit 772fd4d42b

View File

@ -1,7 +1,7 @@
/*
* distroquery - tool for querying data generated by distromatic
*
* Copyright (C) 2013-2020 by Silvan Calarco <silvan.calarco@mambasoft.it>
* Copyright (C) 2013-2024 by Silvan Calarco <silvan.calarco@mambasoft.it>
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of version 2 of the GNU General Public License as published by the
@ -369,7 +369,7 @@ int findFileIdFromPath(sqlite3 *db, char** path) {
char* pt;
char buffer[PATH_MAX];
char sql[PATH_MAX];
char* linkpath = calloc(strlen(*path),0);
char* linkpath = calloc(strlen(*path),1);
sqlite3_stmt* stmt1;
printf("[<a href='javascript:distroquery_request(\"repository=%s&arch=%s&path=/\")'>ROOT</a>]",