mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-25 18:40:19 -04:00
Remove leading double underscores from header include guards
This commit is contained in:
parent
cc18ed39c6
commit
25c86bc1e7
26 changed files with 51 additions and 51 deletions
|
|
@ -107,7 +107,7 @@ SnapRAID is designed to recover from an interruption, including `SIGKILL`, at an
|
|||
- **Indentation**: Tabs for indentation, no alignment (existing codebase style)
|
||||
- **Comments**: Use `/** ... */` for multiline top comments preceding declarations and `/* ... */` for multiline comments within code. Use `/* first letter lowercase */` for single-line inline notes.
|
||||
- **Critical Comments**: Always add a comment at non-obvious critical points, especially around data-integrity invariants, crash recovery, fallback behavior, concurrency, and fatal versus best-effort error handling. Explain why the logic is required, not merely what the code does.
|
||||
- **Headers**: All `.h` files have include guards (`#ifndef __NAME_H`)
|
||||
- **Headers**: All `.h` files have include guards (`#ifndef NAME_H`)
|
||||
- **Preferences**: Use 0 instead of NULL and '\0'
|
||||
- **Preferences**: Use prefix ++variable and --variable instead of postfix variable++ and variable-- where both are equivalent
|
||||
- **Safety Checks**: Avoid adding safety checks for conditions that never happen
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// Copyright (C) 2026 Andrea Mazzoleni
|
||||
|
||||
#ifndef __APP_H
|
||||
#define __APP_H
|
||||
#ifndef APP_H
|
||||
#define APP_H
|
||||
|
||||
#include "os/os.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// Copyright (C) 2016 Andrea Mazzoleni
|
||||
|
||||
#ifndef __BW_H
|
||||
#define __BW_H
|
||||
#ifndef BW_H
|
||||
#define BW_H
|
||||
|
||||
#include "state.h"
|
||||
#include "support.h"
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// Copyright (C) 2011 Andrea Mazzoleni
|
||||
|
||||
#ifndef __ELEM_H
|
||||
#define __ELEM_H
|
||||
#ifndef ELEM_H
|
||||
#define ELEM_H
|
||||
|
||||
#include "util.h"
|
||||
#include "support.h"
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// Copyright (C) 2011 Andrea Mazzoleni
|
||||
|
||||
#ifndef __HANDLE_H
|
||||
#define __HANDLE_H
|
||||
#ifndef HANDLE_H
|
||||
#define HANDLE_H
|
||||
|
||||
#include "state.h"
|
||||
#include "support.h"
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// Copyright (C) 2013 Andrea Mazzoleni
|
||||
|
||||
#ifndef __IMPORT_H
|
||||
#define __IMPORT_H
|
||||
#ifndef IMPORT_H
|
||||
#define IMPORT_H
|
||||
|
||||
#include "elem.h"
|
||||
#include "state.h"
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// Copyright (C) 2016 Andrea Mazzoleni
|
||||
|
||||
#ifndef __IO_H
|
||||
#define __IO_H
|
||||
#ifndef IO_H
|
||||
#define IO_H
|
||||
|
||||
#include "state.h"
|
||||
#include "support.h"
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// Copyright (C) 2026 Andrea Mazzoleni
|
||||
|
||||
#ifndef __LOCATE_H
|
||||
#define __LOCATE_H
|
||||
#ifndef LOCATE_H
|
||||
#define LOCATE_H
|
||||
|
||||
/****************************************************************************/
|
||||
/* snapraid */
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// Copyright (C) 2011 Andrea Mazzoleni
|
||||
|
||||
#ifndef __MEMORY_H
|
||||
#define __MEMORY_H
|
||||
#ifndef MEMORY_H
|
||||
#define MEMORY_H
|
||||
|
||||
/****************************************************************************/
|
||||
/* memory */
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// Copyright (C) 2011 Andrea Mazzoleni
|
||||
|
||||
#ifndef __PARITY_H
|
||||
#define __PARITY_H
|
||||
#ifndef PARITY_H
|
||||
#define PARITY_H
|
||||
|
||||
#include "support.h"
|
||||
#include "bw.h"
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// Copyright (C) 2014 Andrea Mazzoleni
|
||||
|
||||
#ifndef __SEARCH_H
|
||||
#define __SEARCH_H
|
||||
#ifndef SEARCH_H
|
||||
#define SEARCH_H
|
||||
|
||||
#include "elem.h"
|
||||
#include "state.h"
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// Copyright (C) 2011 Andrea Mazzoleni
|
||||
|
||||
#ifndef __SNAPRAID_H
|
||||
#define __SNAPRAID_H
|
||||
#ifndef SNAPRAID_H
|
||||
#define SNAPRAID_H
|
||||
|
||||
/****************************************************************************/
|
||||
/* snapraid */
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// Copyright (C) 2011 Andrea Mazzoleni
|
||||
|
||||
#ifndef __STATE_H
|
||||
#define __STATE_H
|
||||
#ifndef STATE_H
|
||||
#define STATE_H
|
||||
|
||||
#include "elem.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// Copyright (C) 2025 Andrea Mazzoleni
|
||||
|
||||
#ifndef __STR_H
|
||||
#define __STR_H
|
||||
#ifndef STR_H
|
||||
#define STR_H
|
||||
|
||||
#include "app.h"
|
||||
#include "str.h"
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// Copyright (C) 2011 Andrea Mazzoleni
|
||||
|
||||
#ifndef __STREAM_H
|
||||
#define __STREAM_H
|
||||
#ifndef STREAM_H
|
||||
#define STREAM_H
|
||||
|
||||
#include "support.h"
|
||||
#include "util.h"
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// Copyright (C) 2011 Andrea Mazzoleni
|
||||
|
||||
#ifndef __SUPPORT_H
|
||||
#define __SUPPORT_H
|
||||
#ifndef SUPPORT_H
|
||||
#define SUPPORT_H
|
||||
|
||||
#include "app.h"
|
||||
#include "memory.h"
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// Copyright (C) 2025 Andrea Mazzoleni
|
||||
|
||||
#ifndef __THERMAL_H
|
||||
#define __THERMAL_H
|
||||
#ifndef THERMAL_H
|
||||
#define THERMAL_H
|
||||
|
||||
#include "elem.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// Copyright (C) 2011 Andrea Mazzoleni
|
||||
|
||||
#ifndef __UTIL_H
|
||||
#define __UTIL_H
|
||||
#ifndef UTIL_H
|
||||
#define UTIL_H
|
||||
|
||||
#include "tommyds/tommytypes.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
// Copyright (C) 2013 Andrea Mazzoleni
|
||||
|
||||
#ifndef __RAID_COMBO_H
|
||||
#define __RAID_COMBO_H
|
||||
#ifndef RAID_COMBO_H
|
||||
#define RAID_COMBO_H
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
// Copyright (C) 2013 Andrea Mazzoleni
|
||||
|
||||
#ifndef __RAID_CPU_H
|
||||
#define __RAID_CPU_H
|
||||
#ifndef RAID_CPU_H
|
||||
#define RAID_CPU_H
|
||||
|
||||
#ifdef CONFIG_X86
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
// Copyright (C) 2013 Andrea Mazzoleni
|
||||
|
||||
#ifndef __RAID_GF_H
|
||||
#define __RAID_GF_H
|
||||
#ifndef RAID_GF_H
|
||||
#define RAID_GF_H
|
||||
|
||||
/*
|
||||
* Galois field operations.
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
// Copyright (C) 2013 Andrea Mazzoleni
|
||||
|
||||
#ifndef __RAID_HELPER_H
|
||||
#define __RAID_HELPER_H
|
||||
#ifndef RAID_HELPER_H
|
||||
#define RAID_HELPER_H
|
||||
|
||||
/**
|
||||
* Inserts an integer in a sorted vector.
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
// Copyright (C) 2013 Andrea Mazzoleni
|
||||
|
||||
#ifndef __RAID_INTERNAL_H
|
||||
#define __RAID_INTERNAL_H
|
||||
#ifndef RAID_INTERNAL_H
|
||||
#define RAID_INTERNAL_H
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
/* Includes the project configuration for HAVE_* defines */
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
// Copyright (C) 2013 Andrea Mazzoleni
|
||||
|
||||
#ifndef __RAID_MEMORY_H
|
||||
#define __RAID_MEMORY_H
|
||||
#ifndef RAID_MEMORY_H
|
||||
#define RAID_MEMORY_H
|
||||
|
||||
/**
|
||||
* Memory allocation and benchmark layout helpers.
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
// Copyright (C) 2013 Andrea Mazzoleni
|
||||
|
||||
#ifndef __RAID_H
|
||||
#define __RAID_H
|
||||
#ifndef RAID_H
|
||||
#define RAID_H
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
// Copyright (C) 2013 Andrea Mazzoleni
|
||||
|
||||
#ifndef __RAID_TEST_H
|
||||
#define __RAID_TEST_H
|
||||
#ifndef RAID_TEST_H
|
||||
#define RAID_TEST_H
|
||||
|
||||
/**
|
||||
* Tests insertion function.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue