[AD] [ alleg-Bugs-3104614 ] alsamidi.c: overwritten error return value

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Bugs item #3104614, was opened at 2010-11-07 14:31
Message generated for change (Tracker Item Submitted) made by nikai
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105665&aid=3104614&group_id=5665

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Linux
Group: 4.4
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Nicolas Kaiser (nikai)
Assigned to: Nobody/Anonymous (nobody)
Summary: alsamidi.c: overwritten error return value

Initial Comment:
Hi there!

I noticed an overwritten error return value. The assignment
suggests to me that the intention might be to return this
error value, instead of overwriting it instantly.
Is it a problem?

Best regards,
Nicolas Kaiser
---
--- ./allegro-4.4.1.1/src/unix/alsamidi.c	2007-03-06 17:12:18.000000000 +0100
@@ -176,13 +176,10 @@ static int alsa_rawmidi_init(int input,
 
       err = snd_rawmidi_open(&rawmidi_handle, card, device, SND_RAWMIDI_OPEN_OUTPUT_APPEND);
 #endif
       if (err) {
 	 snprintf(temp, sizeof(temp), "Could not open card/rawmidi device: %s", snd_strerror(err));
 	 ustrzcpy(allegro_error, ALLEGRO_ERROR_SIZE, get_config_text(temp));
->	 ret = -1;
       }
 
->     ret = 0;
    }
 
    if (rawmidi_handle) {

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105665&aid=3104614&group_id=5665




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/