projects
/
deliverable
/
lttng-modules.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: handle default switch case with -EINVAL in __lttng_counter_add
[deliverable/lttng-modules.git]
/
include
/
counter
/
counter-api.h
diff --git
a/include/counter/counter-api.h
b/include/counter/counter-api.h
index 02d709a1e3dd6ca74a9c0fea9bba2e4e4b58597f..12520445fb30a8538ac1f958ce955149916ffcda 100644
(file)
--- a/
include/counter/counter-api.h
+++ b/
include/counter/counter-api.h
@@
-80,6
+80,8
@@
static inline int __lttng_counter_add(const struct lib_counter_config *config,
} while (old != res);
break;
}
} while (old != res);
break;
}
+ default:
+ return -EINVAL;
}
if (v > 0 && (v >= U8_MAX || n < old))
overflow = true;
}
if (v > 0 && (v >= U8_MAX || n < old))
overflow = true;
@@
-119,6
+121,8
@@
static inline int __lttng_counter_add(const struct lib_counter_config *config,
} while (old != res);
break;
}
} while (old != res);
break;
}
+ default:
+ return -EINVAL;
}
if (v > 0 && (v >= U16_MAX || n < old))
overflow = true;
}
if (v > 0 && (v >= U16_MAX || n < old))
overflow = true;
@@
-158,6
+162,8
@@
static inline int __lttng_counter_add(const struct lib_counter_config *config,
} while (old != res);
break;
}
} while (old != res);
break;
}
+ default:
+ return -EINVAL;
}
if (v > 0 && (v >= U32_MAX || n < old))
overflow = true;
}
if (v > 0 && (v >= U32_MAX || n < old))
overflow = true;
@@
-198,6
+204,8
@@
static inline int __lttng_counter_add(const struct lib_counter_config *config,
} while (old != res);
break;
}
} while (old != res);
break;
}
+ default:
+ return -EINVAL;
}
if (v > 0 && n < old)
overflow = true;
}
if (v > 0 && n < old)
overflow = true;
This page took
0.024728 seconds
and
5
git commands to generate.