Changeset: 025d1f462c4b for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=025d1f462c4b
Modified Files:
        clients/src/mapilib/Mapi.mx
Branch: Jun2010
Log Message:

We don't need a variable just to do a sizeof.


diffs (15 lines):

diff -r 203a7f84f1de -r 025d1f462c4b clients/src/mapilib/Mapi.mx
--- a/clients/src/mapilib/Mapi.mx       Tue Jul 27 08:55:33 2010 +0200
+++ b/clients/src/mapilib/Mapi.mx       Tue Jul 27 11:18:52 2010 +0200
@@ -2339,10 +2339,9 @@
 #ifdef HAVE_SYS_UN_H
        if (mid->hostname == NULL) {
                struct stat st;
-               struct sockaddr_un s; /* just for sizeof(s.sun_path) */
                snprintf(errbuf, sizeof(errbuf),
                         CLIENTS_PREFIX "/var/MonetDB5/dbfarm/mapi_socket");
-               if (strlen(errbuf) <= sizeof(s.sun_path) &&
+               if (strlen(errbuf) <= sizeof(((struct sockaddr_un *) 
0)->sun_path) &&
                                stat(errbuf, &st) != 1 &&
                                S_ISSOCK(st.st_mode))
                        mid->hostname = strdup(errbuf);
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to