lkml.org 
[lkml]   [2019]   [Sep]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[WTF?] aafs_create_symlink() weirdness

static struct dentry *aafs_create_symlink(const char *name,
struct dentry *parent,
const char *target,
void *private,
const struct inode_operations *iops)
{
struct dentry *dent;
char *link = NULL;

if (target) {
if (!link)
return ERR_PTR(-ENOMEM);
}

Er... That's an odd way to spell
if (target)
return ERR_PTR(-ENOMEM);
(and an odd error value to use). Especially since all callers are passing
NULL as target.

Why is that code even there, why does that argument still exist and
how many people have actually read that function?

\
 
 \ /
  Last update: 2019-09-24 04:04    [W:0.033 / U:0.324 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site