lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20080228.140821.249369808.davem@davemloft.net>
Date:	Thu, 28 Feb 2008 14:08:21 -0800 (PST)
From:	David Miller <davem@...emloft.net>
To:	wangchen@...fujitsu.com
Cc:	netdev@...r.kernel.org
Subject: Re: [PATCH 06/15] [IRDA]: Use proc_create() to setup ->proc_fops
 first

From: Wang Chen <wangchen@...fujitsu.com>
Date: Thu, 28 Feb 2008 18:56:39 +0800

> @@ -75,11 +75,8 @@ static int __init ircomm_init(void)
>  	}
>  
>  #ifdef CONFIG_PROC_FS
> -	{ struct proc_dir_entry *ent;
> -	ent = create_proc_entry("ircomm", 0, proc_irda);
> -	if (ent)
> -		ent->proc_fops = &ircomm_proc_fops;
> -	}
> +	struct proc_dir_entry *ent;
> +	ent = proc_create("ircomm", 0, proc_irda, &ircomm_proc_fops);
>  #endif /* CONFIG_PROC_FS */
>  
>  	IRDA_MESSAGE("IrCOMM protocol (Dag Brattli)\n");

This is not C++, you therefore cannot declare local variables in
arbitrary locations of the function body.  That's what the braces
were there for, to create the necessary new local scope.

For certain versions of GCC this won't even build, newer versions
default to c99 or similar and therefore just so happen to work.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ