Re: XForms: strcmp

From: Steve Lamont (spl@ncmir.ucsd.edu)
Date: Wed Nov 22 2000 - 17:18:57 EST

  • Next message: T.C. Zhao: "Re: XForms: strcmp"

    # To subscribers of the xforms list from Steve Lamont <spl@ncmir.ucsd.edu> :

    > if((strcmp(project.proj_name,NULL)) == 0) <----------- this is where the
    > fault occures

    Perhaps I'm missing something but I'd *expect* this to core dump.

    You're explicitly feeding strcmp() a NULL pointer.

    If you're trying to test whether `project.proj_name' is NULL, you
    should do

            if ( project.proj_name == NULL ) [

                    ...

            }

    I'm surprised it runs on any system. It's definitely not an
    XForms-related problem.

                                                            spl
    _________________________________________________
    To unsubscribe, send the message "unsubscribe" to
    xforms-request@bob.usuhs.mil or see
    http://bob.usuhs.mil/mailserv/xforms.html
    XForms Home Page: http://world.std.com/~xforms
    List Archive: http://bob.usuhs.mil/mailserv/list-archives/



    This archive was generated by hypermail 2b29 : Wed Nov 22 2000 - 17:22:08 EST