[lkml]   [2003]   [May]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRE: try_then_request_module
    Hi Ingo.

    > Usually this is all as simple as:
    > int module_loaded_flag=0;
    > retry_with_module_loaded:
    > /* search code */
    > if (!module_loaded_flag && !found) {
    > module_loaded_flag=1;
    > if (!request_module(bla))
    > goto retry_with_module_loaded;
    > }
    > return found;
    > which is very space efficient and also still readable.

    Out of curiosity, what exactly is the purpose of the goto in the
    above code? Since we set module_loaded_flag just prior to it, the
    first if statement must fail after the goto, so we just fall down
    to where we would have been without the goto.

    It all looks a tad pointless to me...

    Best wishes from Riley.
    * Nothing as pretty as a smile, nothing as ugly as a frown.

    Outgoing mail is certified Virus Free.
    Checked by AVG anti-virus system (
    Version: 6.0.481 / Virus Database: 277 - Release Date: 13-May-2003

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 13:35    [W:0.034 / U:59.992 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site