Changeset 41715 for trunk/Ohana/src/opihi/lib.shell/VectorOps.c
- Timestamp:
- Jul 13, 2021, 10:30:23 AM (5 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/lib.shell/VectorOps.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/lib.shell/VectorOps.c
r41341 r41715 65 65 } 66 66 67 int IsVectorNameValid (char *name) { 68 69 char *p = name; 70 71 while (*p) { 72 int valid = OHANA_WHITESPACE(*p); 73 valid = valid || ISVEC(*p); 74 if (!valid) return FALSE; 75 p++; 76 } 77 return TRUE; 78 } 79 67 80 int IsVectorPtr (Vector *vec) { 68 81 … … 89 102 if (i == Nvectors) { 90 103 if (mode == OLDVECTOR) goto error; 104 // validate vector name syntax 105 if (!IsVectorNameValid(name)) { gprint (GP_ERR, "invalid vector name %s\n", name); return NULL; } 91 106 pthread_mutex_lock (&mutex); 92 107 Nvectors ++;
Note:
See TracChangeset
for help on using the changeset viewer.
