Summary:ASTERISK-06509: four unnecessary lines of code
Reporter:Fabian Mueller (fmueller)Labels:
Date Opened:2006-03-09 09:29:27.000-0600Date Closed:2011-06-07 14:11:54
Versions:Frequency of
Description:There are "return -1" statements in file.c in lines 808, 810, 812 and 814. I think they are useless because ast_applystream and ast_playstream always return 0. So return -1 is never executed. They are just a bit confusing. I hope I am right.
Comments:By: Tilghman Lesher (tilghman) 2006-03-09 14:03:30.000-0600

Actually, I suspect the real answer is that ast_playstream should at certain times be returning non-zero.  But we'll need someone more familiar with the code to make that determination.

By: Joshua C. Colp (jcolp) 2006-03-20 17:19:34.000-0600

I agree with you on this. Based on the return values of the functions being 0 all the time... then the returns will never get executed no matter what. It's not hurting things, but it's just useless code.

By: Joshua C. Colp (jcolp) 2006-03-21 15:50:16.000-0600

Okay - based on a discussion on IRC we have decided that these lines will be left in for now to leave room for future expansion for when we want to allow the functions to return non-zero values to indicate errors. Thanks for bringing this up though!