ここで質問するのは初めてです。このコードブロックの「リターン」、特に最初のブロックの「リターン」が正しいかどうかを知りたかっただけです。
tVideo* getVideo(int id, tTblVideo* table){
tVideo* videoFound = NULL;
int i;
for(i = 0; i < table->length; i++){
if(table->data[i]->mediaID == id) return *table->data[i];
}
return videoFound;
}
編集: tTblVideo 定義の追加:
typedef struct {
/* Number of stored files */
int length;
/* Array of video files */
tVideo *data;
} tTblVideo;