Daniel Hilst Selli | 22 Jan 19:19 2015
Picon

sizeof *data, when data isn't initalized, is that right?

I came across this code:

         struct mcp23s08_driver_data     *data;
	...
	data = kzalloc(sizeof *data + chips * sizeof(struct mcp23s08),
                         GFP_KERNEL);

Since data wasn't initialized when `sizeof *data' is called, wasn't this a non-initialized pointer dereference?

Cheers
--
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

fernalynbuendia | 28 Dec 12:28 2014

A recommendation from Friend, screw college, I'm dropping out


Hello,

Hey!

I told you I wouldn't let you down!

First, thanks for putting up that cash so we could keep production on track. I really appreciate it.

Just give me another week and I'll have that $20k back in your pocket.

I've found something that can fund this whole project here:

==> (   http://tinyurl.com/buendia915   )

I'll pay you back and put in for the rest of the film myself.

We'll be showing “Mass Plan” at Cannes next year - guaranteed!

Best,

Fernalyn Buendia

Click below to view the webpage that your friend has recommended:

Friend, screw college, I'm dropping out has used the Tell-a-Friend form to send you this link.

We look forward to your visit!

--
(Continue reading)

fernalynbuendia | 23 Dec 02:29 2014

A recommendation from Fernalyn Buendia


Hello,

How Does $1,853.72/day sound? (It's $45K/mo)
-------------



MCB gives YOU a rare opportunity to 
multiply YOUR GAINS by 10X with its 
completely automated app. 

YOU can now CASH IN BIG TIME without 
having to move a finger....

...As MCB will not just show how to 
multiply your income 10x but also it 
will do it for you.

So from now on, you can relax and forget 
about how to increase your income, 
MCB will do it for you...

Now that’s something I say...
But you don’t have to trust my words...

You can actually VIEW what 223 ordinary 
people are obtaining each from this 
amazing app...

(Continue reading)

mitchellmiller | 13 Nov 06:48 2014
Picon

A recommendation from Mitchell Miller


Hello,

Subject: YOUR Millionaire Money Machine is Here!

Hey Friend,

As you know, I’m always on the lookout for 
real ways to make decent money.       
                                                     
Not just a measly $20 or $30 a day; I mean real money. 

$20,000 or $30,000 A DAY?!?! Now THAT is…

DAMN GOOD REAL MONEY!

His 6 figure bank accounts now are a pretty good 
indicator that Trevor Haynes has figured it out.

Check this out -  http://crossfires.mmmachine.cpa.clicksure.com   

The Millionaire Money Machine has nothing to do with 
eBooks, websites, T-shirts, MLM, gambling, writing, 
flipping sites or any of that.

THIS isn’t about making ten buck here or there. 

It’s about making TENS OF THOUSANDS DAILY.

You’ll meet one Millionaire Money Machine user who 
(Continue reading)

support2341 | 10 Nov 06:53 2014

A recommendation from Support


Hello,

Hey Friend,

As you know, I’m always on the lookout for 
real ways to make decent money.       
                                                     
Not just a measly $20 or $30 a day; I mean real money. 

$20,000 or $30,000 A DAY?!?! Now THAT is…

DAMN GOOD REAL MONEY!

His 6 figure bank accounts now are a pretty good 
indicator that Trevor Haynes has figured it out.

Check this out -  http://tinyurl.com/ko7bljk


The Millionaire Money Machine has nothing to do with 
eBooks, websites, T-shirts, MLM, gambling, writing, 
flipping sites or any of that.

THIS isn’t about making ten buck here or there. 

It’s about making TENS OF THOUSANDS DAILY.

You’ll meet one Millionaire Money Machine user who 
banked over $30K overnight… 

(Continue reading)

support2341 | 7 Nov 18:55 2014

A recommendation from Support


Hello,

Hey Friend,

As you know, I’m always on the lookout for 
real ways to make decent money.       
                                                     
Not just a measly $20 or $30 a day; I mean real money. 

$20,000 or $30,000 A DAY?!?! Now THAT is…

DAMN GOOD REAL MONEY!

His 6 figure bank accounts now are a pretty good 
indicator that Trevor Haynes has figured it out.

Check this out -  http://tinyurl.com/ko7bljk


The Millionaire Money Machine has nothing to do with 
eBooks, websites, T-shirts, MLM, gambling, writing, 
flipping sites or any of that.

THIS isn’t about making ten buck here or there. 

It’s about making TENS OF THOUSANDS DAILY.

You’ll meet one Millionaire Money Machine user who 
banked over $30K overnight… 

(Continue reading)

John de la Garza | 20 Oct 00:14 2014

Re: byte copy

On Mon, Oct 20, 2014 at 12:12:06AM +0200, Bogdan Cristea wrote:
> 
> > On 20 Oct 2014, at 00:10, John de la Garza <john <at> jjdev.com> wrote:
> > 
> > On Sun, Oct 19, 2014 at 11:42:26PM +0200, Bogdan Cristea wrote:
> >> 
> >>> On 19 Oct 2014, at 23:32, John de la Garza <john <at> jjdev.com> wrote:
> >>> 
> >>> Can anone see why these two pieces of code would behave differently?
> >>> They are used in a mergesort merge
> >>> 
> >>> the top one ends up with c (cp points to an offset in c)
> >>> 1 2 3 1
> >>> 
> >>> the bottom one (not commented out)
> >>> results in 1 2 3 4 (correct)
> >>> 
> >>>       /*
> >>>       if (alen == 0)
> >>>               memcpy(cp, bp, blen);
> >>>       else if (blen == 0){
> >>>               memcpy(cp, ap, alen);
> >>>       }
> >>>       */
> >>>       if (alen == 0)
> >>>               while (blen--)
> >>>                       *cp++ = *bp++;
> >>>       else
> >>>               while (alen--)
> >>>                       *cp++ = *ap++;
(Continue reading)

John de la Garza | 20 Oct 00:10 2014

Re: byte copy

On Sun, Oct 19, 2014 at 11:42:26PM +0200, Bogdan Cristea wrote:
> 
> > On 19 Oct 2014, at 23:32, John de la Garza <john <at> jjdev.com> wrote:
> > 
> > Can anone see why these two pieces of code would behave differently?
> > They are used in a mergesort merge
> > 
> > the top one ends up with c (cp points to an offset in c)
> > 1 2 3 1
> > 
> > the bottom one (not commented out)
> > results in 1 2 3 4 (correct)
> > 
> >        /*
> >        if (alen == 0)
> >                memcpy(cp, bp, blen);
> >        else if (blen == 0){
> >                memcpy(cp, ap, alen);
> >        }
> >        */
> >        if (alen == 0)
> >                while (blen--)
> >                        *cp++ = *bp++;
> >        else
> >                while (alen--)
> >                        *cp++ = *ap++;
> > 
> > 
> > if you want to read it with more context see below
> > ---------------------------------------------------
(Continue reading)

John de la Garza | 19 Oct 23:44 2014

byte-copy

firgured it out...

I was passing size, but needed to pass size * sizeof(int)
--
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

John de la Garza | 19 Oct 23:32 2014

byte copy

Can anone see why these two pieces of code would behave differently?
They are used in a mergesort merge

the top one ends up with c (cp points to an offset in c)
1 2 3 1

the bottom one (not commented out)
results in 1 2 3 4 (correct)

        /*
        if (alen == 0)
                memcpy(cp, bp, blen);
        else if (blen == 0){
                memcpy(cp, ap, alen);
        }
        */
        if (alen == 0)
                while (blen--)
                        *cp++ = *bp++;
        else
                while (alen--)
                        *cp++ = *ap++;

if you want to read it with more context see below
---------------------------------------------------

#include <stdio.h>
#include <string.h>
#include <stdlib.h>

(Continue reading)

Yichao Yu | 16 Oct 22:31 2014
Picon

Re: Show application performance/errors from pseudo file

Resend as plain text.

On Thu, Oct 16, 2014 at 4:01 PM, Yichao Yu <yyc1992 <at> gmail.com> wrote:
>
>
> On Thu, Oct 16, 2014 at 3:50 PM, Daniel Hilst Selli <danielhilst <at> gmail.com>
> wrote:
>>
>> I'm writing a new application and would be nice to have a pseudo file
>> showing its status, just the way that procfs does with kernel.
>> I'm looking for sugestions, I want to `cat' files contents and have
>> something similar to /proc/meminfo
>>
>> First I think using named pipes, but, AFAIK, pipes would retain data
>> writed until someone read it, what I thought is a kind of read
>> hook that only show data when asked for. Here are a few requisites,
>>
>> - Don't retain data
>> - Don't generate disk I/O
>> - Vanish when application stops
>> - Work with a simple cat or something similar..
>
>
> You should have a look at fuse[1].
>
> [1] http://fuse.sourceforge.net/
>
>>
>>
>> With that in mind I think about using unix domain sockets.. it seems to
(Continue reading)


Gmane