Ma se c è giustamente un puntatore a struttura database, come mai la tua funzione restituisce un int ?