Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
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

Your e-mail address:

Powered by Openwall GNU/*/Linux - Powered by OpenVZ