Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABtNtWGgJMXOtRkJ7P+5pzr0AtE8YZ5pcbexvtYp78JSOH+0iQ@mail.gmail.com>
Date: Sun, 5 Apr 2015 12:46:18 +0800
From: Kai Zhao <loverszhao@...il.com>
To: john-dev@...ts.openwall.com
Subject: Re: Coding Style

> Unfortunately a lot of the code deviate from our coding style.

Yes, I have found some functions which put the opening brace of a function
body on the same line. Such as below:

static void rexgen_setlocale() {
    const char* defaultLocale = "en_US.UTF8";
    const char* sysLocale = NULL;
    if ((sysLocale = getenv("LC_CTYPE")) != NULL) {
        setlocale(LC_CTYPE, sysLocale);
    }
    if ((sysLocale = getenv("LC_MESSAGES")) != NULL) {
        setlocale(LC_CTYPE, sysLocale);
    }
    if ((sysLocale = getenv("LC_ALL")) != NULL) {
        setlocale(LC_CTYPE, sysLocale);
    }
    if (sysLocale == NULL) {
        setlocale(LC_ALL, defaultLocale);
    }
}


Thanks,

Kai

Content of type "text/html" skipped

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.