ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/src/ircd.c
(Generate patch)

Comparing ircd-hybrid/trunk/src/ircd.c (file contents):
Revision 4732 by michael, Sat Oct 11 19:16:48 2014 UTC vs.
Revision 4733 by michael, Sun Oct 12 11:58:19 2014 UTC

# Line 351 | Line 351 | check_pidfile(const char *filename)
351    /* Don't do logging here, since we don't have log() initialised */
352    if ((fb = fopen(filename, "r")))
353    {
354 <    if (fgets(buff, 20, fb) == NULL)
354 >    if (!fgets(buff, 20, fb))
355      {
356        /* log(L_ERROR, "Error reading from pid file %s (%s)", filename,
357         * strerror(errno));
# Line 420 | Line 420 | ssl_init(void)
420    SSL_load_error_strings();
421    SSLeay_add_ssl_algorithms();
422  
423 <  if ((ConfigServerInfo.server_ctx = SSL_CTX_new(SSLv23_server_method())) == NULL)
423 >  if (!(ConfigServerInfo.server_ctx = SSL_CTX_new(SSLv23_server_method())))
424    {
425      const char *s = ERR_lib_error_string(ERR_get_error());
426  
# Line 449 | Line 449 | ssl_init(void)
449    SSL_CTX_set_options(ConfigServerInfo.server_ctx, SSL_OP_SINGLE_ECDH_USE);
450   #endif
451  
452 <  if ((ConfigServerInfo.client_ctx = SSL_CTX_new(SSLv23_client_method())) == NULL)
452 >  if (!(ConfigServerInfo.client_ctx = SSL_CTX_new(SSLv23_client_method())))
453    {
454      const char *s = ERR_lib_error_string(ERR_get_error());
455  
# Line 470 | Line 470 | int
470   main(int argc, char *argv[])
471   {
472    /* Check to see if the user is running us as root, which is a nono */
473 <  if (geteuid() == 0)
473 >  if (!geteuid())
474    {
475      fprintf(stderr, "ERROR: This server won't run as root/superuser\n");
476      return -1;

Diff Legend

– Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)