All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] curious snippet in drivers/mtd/dataflash.c
@ 2016-12-28 15:15 Robert P. J. Day
  0 siblings, 0 replies; only message in thread
From: Robert P. J. Day @ 2016-12-28 15:15 UTC (permalink / raw)
  To: u-boot


  not sure about this bit of code in that source file:

    /* Set the environment according to the label...*/
    if(protected == FLAG_PROTECT_INVALID) {
        dataflash_info[i].Device.area_list[j].protected =
            FLAG_PROTECT_INVALID;
    } else {
        dataflash_info[i].Device.area_list[j].protected =
            protected;
    }

is that not just setting the value to "protected" in both cases? what
is the point of that conditional?

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-12-28 15:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-28 15:15 [U-Boot] curious snippet in drivers/mtd/dataflash.c Robert P. J. Day

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.